mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-14 07:28:41 +00:00
automated phpcs fixes
This commit is contained in:
parent
c2538fed60
commit
f88a530b96
|
|
@ -353,6 +353,18 @@ abstract class DataMapperAbstract
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define the joining data
|
||||||
|
*
|
||||||
|
* @param string $member Property name to filter by
|
||||||
|
* @param mixed $value Filter value
|
||||||
|
* @param string $logic Comparison logic (e.g. =, in, ...)
|
||||||
|
* @param string $connector Filter connector (e.g. AND, OR, ...)
|
||||||
|
*
|
||||||
|
* @return self
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function on(string $member, mixed $value, string $logic = '=', string $connector = 'AND', string $relation = '') : self
|
public function on(string $member, mixed $value, string $logic = '=', string $connector = 'AND', string $relation = '') : self
|
||||||
{
|
{
|
||||||
$this->on[$relation][] = [
|
$this->on[$relation][] = [
|
||||||
|
|
|
||||||
|
|
@ -404,7 +404,7 @@ final class HttpRequest extends RequestAbstract
|
||||||
public function getLocale() : string
|
public function getLocale() : string
|
||||||
{
|
{
|
||||||
if (!empty($this->locale)) {
|
if (!empty($this->locale)) {
|
||||||
return $this->locale = $this->header->l11n->language . '_' . $this->header->l11n->getCountry();
|
return $this->locale = $this->header->l11n->language . '_' . $this->header->l11n->country;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
|
if (!isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
|
||||||
|
|
|
||||||
|
|
@ -156,6 +156,17 @@ final class EncryptionHelper
|
||||||
return $plaintext === false ? '' : $plaintext;
|
return $plaintext === false ? '' : $plaintext;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Decrypt an encrypted file
|
||||||
|
*
|
||||||
|
* @param string $in Encrypted file
|
||||||
|
* @param string $out Decrypted file
|
||||||
|
* @param string $keyHex Shared key in hex
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public static function decryptFile(string $in, string $out, string $keyHex) : bool
|
public static function decryptFile(string $in, string $out, string $keyHex) : bool
|
||||||
{
|
{
|
||||||
$fpSource = \fopen($in, 'rb');
|
$fpSource = \fopen($in, 'rb');
|
||||||
|
|
|
||||||
|
|
@ -2725,14 +2725,15 @@ class QR extends TwoDAbstract
|
||||||
$rs['gfpoly'] = $gfpoly;
|
$rs['gfpoly'] = $gfpoly;
|
||||||
|
|
||||||
// Find prim-th root of 1, used in decoding
|
// Find prim-th root of 1, used in decoding
|
||||||
for ($iprim=1; ($iprim % $prim) !== 0; $iprim += $rs['nn']) {
|
$iprim = 1;
|
||||||
// intentional empty-body loop!
|
while ($iprim % $prim !== 0) {
|
||||||
|
$iprim += $rs['nn'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$rs['iprim'] = (int) ($iprim / $prim);
|
$rs['iprim'] = (int) ($iprim / $prim);
|
||||||
$rs['genpoly'][0] = 1;
|
$rs['genpoly'][0] = 1;
|
||||||
|
|
||||||
for ($i = 0,$root = $fcr * $prim; $i < $nroots; $i++, $root += $prim) {
|
for ($i = 0, $root = $fcr * $prim; $i < $nroots; ++$i, $root += $prim) {
|
||||||
$rs['genpoly'][$i + 1] = 1;
|
$rs['genpoly'][$i + 1] = 1;
|
||||||
|
|
||||||
// Multiply rs->genpoly[] by @**(root + x)
|
// Multiply rs->genpoly[] by @**(root + x)
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ final class ViewTest extends \PHPUnit\Framework\TestCase
|
||||||
*/
|
*/
|
||||||
public function testHasData() : void
|
public function testHasData() : void
|
||||||
{
|
{
|
||||||
$view = new View($this->app->l11nManager);
|
$view = new View($this->app->l11nManager);
|
||||||
$view->data['a'] = 1;
|
$view->data['a'] = 1;
|
||||||
|
|
||||||
self::assertTrue($view->hasData('a'));
|
self::assertTrue($view->hasData('a'));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user