Skip to content

Commit

Permalink
Merge pull request #42 from nutgram/analysis-lZWE39
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
sergix44 authored Jul 16, 2024
2 parents b27eb30 + b228624 commit 8519679
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/Hydrator.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
use SergiX44\Hydrator\Annotation\SkipConstructor;
use SergiX44\Hydrator\Annotation\UnionResolver;
use SergiX44\Hydrator\Exception\InvalidObjectException;

use function array_key_exists;
use function class_exists;
use function ctype_digit;
Expand All @@ -37,6 +38,7 @@
use function is_subclass_of;
use function sprintf;
use function strtotime;

use const FILTER_NULL_ON_FAILURE;
use const FILTER_VALIDATE_BOOLEAN;
use const FILTER_VALIDATE_FLOAT;
Expand Down
6 changes: 3 additions & 3 deletions src/Resolver/EnumOrScalar.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ public function resolve(string $propertyName, array $propertyTypes, array $data)
$valueType = gettype($value);
$valueType = match ($valueType) {
'integer' => 'int',
'double' => 'float',
'double' => 'float',
'boolean' => 'bool',
'NULL' => 'null',
default => $valueType,
'NULL' => 'null',
default => $valueType,
};

foreach ($propertyTypes as $t) {
Expand Down

0 comments on commit 8519679

Please sign in to comment.