Skip to content

Commit

Permalink
fix phpstan errors
Browse files Browse the repository at this point in the history
  • Loading branch information
d8vjork committed Aug 10, 2023
1 parent 1c3d2b4 commit 13425b1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/PropertiesMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ public function run(): static
continue;
}

$propertyTypes = $propertyInfoExtractor->getTypes($this->dataClass, $propertyKey);
$propertyTypes = $propertyInfoExtractor->getTypes($this->dataClass, $propertyKey) ?? [];

if (! $propertyTypes || count($propertyTypes) === 0) {
if (count($propertyTypes) === 0) {
$this->data[$propertyKey] = $value;

continue;
Expand Down Expand Up @@ -140,7 +140,7 @@ protected function normalisePropertyKey(string $key): string|null
/**
* Map data value into model instance.
*
* @param class-string<\Illuminate\Database\Eloquent\Model> $model
* @param class-string<\Illuminate\Database\Eloquent\Model> $modelClass
*/
protected function mapIntoModel(string $modelClass, string $propertyKey, mixed $value)
{
Expand Down

0 comments on commit 13425b1

Please sign in to comment.