Skip to content

Commit

Permalink
Merge pull request #41 from OliverBeckwith/fix/relations-return-type
Browse files Browse the repository at this point in the history
Fix relation return type check
  • Loading branch information
Luukdewaaier authored Mar 5, 2024
2 parents 5e71ad9 + 115b25f commit 12d6bb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Support/Generators/RelationPropertyGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function getPropertyDefinition(Model $model): array
continue;
}

$relationReturn = array_first($returnType, fn ($type) => !!strpos($type, self::RELATION_TYPE));
$relationReturn = array_first($returnType, fn ($type) => str_contains($type, self::RELATION_TYPE));

if ($relationReturn) {
$methodName = $method->getName();
Expand Down

0 comments on commit 12d6bb8

Please sign in to comment.