Skip to content

Commit 7538371

Browse files
committed
PHPCSFixer
1 parent bbaf573 commit 7538371

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

src/PHPFUI/ORM/Record.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function __construct(int|array|null|string|\PHPFUI\ORM\DataObject $parame
104104
break;
105105

106106
case \PHPFUI\ORM\DataObject::class:
107-
$this->current = array_intersect_key($parameter->current, static::$fields);
107+
$this->current = \array_intersect_key($parameter->current, static::$fields);
108108

109109
break;
110110

@@ -213,6 +213,7 @@ public function __set(string $field, mixed $value) : void
213213
{
214214
$message = static::class . "::{$field} is of type {$expectedType} but being assigned a type of {$haveType}";
215215
\PHPFUI\ORM::log(\Psr\Log\LogLevel::WARNING, $message);
216+
216217
// do the conversion
217218
switch ($expectedType)
218219
{
@@ -925,6 +926,7 @@ private function privateInsert(bool $updateOnDuplicate, string $ignore = '') : i
925926
if (static::$autoIncrement && $returnValue)
926927
{
927928
$returnValue = (int)\PHPFUI\ORM::lastInsertId(static::$primaryKeys[0]);
929+
928930
if ($returnValue)
929931
{
930932
$this->current[static::$primaryKeys[0]] = $returnValue;

src/PHPFUI/ORM/RelatedRecord.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function getValue(array $parameters) : mixed
1717

1818
if ($field)
1919
{
20-
return new $class($this->currentRecord->$field);
20+
return new $class($this->currentRecord->{$field});
2121
}
2222

2323
return new $class($this->currentRecord[$this->fieldName . \PHPFUI\ORM::$idSuffix]);

src/PHPFUI/ORM/Table.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,7 @@ public function getSelect() : string
619619
$columns = [];
620620
// make explicit column names for joined tables since we don't have explicit selects
621621
$sql = "\n`{$this->instance->getTableName()}`.*";
622+
622623
// set column names from explicit select
623624
foreach ($this->getFields() as $field => $data)
624625
{

src/PHPFUI/ORM/Validator.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,10 +334,12 @@ private function validate_card(string $number) : string
334334
for ($i = 0; $i < $number_length; ++$i)
335335
{
336336
$digit = (int)$number[$i];
337+
337338
// Multiply alternate digits by two
338339
if ($i % 2 == $parity)
339340
{
340341
$digit *= 2;
342+
341343
// If the sum is two digits, add them together (in effect)
342344
if ($digit > 9)
343345
{
@@ -391,6 +393,7 @@ private function validate_date(mixed $value) : string
391393
$month = 1;
392394
$day = 2;
393395
$parts = \explode('/', \str_replace(self::$dateSeparators, '/', (string)$value));
396+
394397
// allow zero dates if not required
395398
if (! $this->currentRequired && ! \array_sum($parts))
396399
{
@@ -440,6 +443,7 @@ private function validate_day_month_year(mixed $value) : string
440443
$month = 1;
441444
$day = 0;
442445
$parts = \explode('/', \str_replace(self::$dateSeparators, '/', (string)$value));
446+
443447
// allow zero dates if not required
444448
if (! $this->currentRequired && ! \array_sum($parts))
445449
{
@@ -622,6 +626,7 @@ private function validate_month_day_year(mixed $value) : string
622626
$month = 0;
623627
$day = 1;
624628
$parts = \explode('/', \str_replace(self::$dateSeparators, '/', (string)$value));
629+
625630
// allow zero dates if not required
626631
if (! $this->currentRequired && ! \array_sum($parts))
627632
{

0 commit comments

Comments
 (0)