Skip to content

Commit

Permalink
prevent generation of incorrect property annotation (#1665)
Browse files Browse the repository at this point in the history
Co-authored-by: Skyler Mayfield <[email protected]>
  • Loading branch information
skyler544 and Skyler Mayfield authored Jan 29, 2025
1 parent 187ce9b commit ead24b1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Console/ModelsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,10 @@ public function getPropertiesFromMethods($model)
)
);
});
// https://github.com/barryvdh/laravel-ide-helper/issues/1664
$reflections = array_filter($reflections, function (\ReflectionMethod $methodReflection) {
return !($methodReflection->getName() === 'getUseFactoryAttribute');
});
sort($reflections);
foreach ($reflections as $reflection) {
$type = $this->getReturnTypeFromReflection($reflection);
Expand Down

0 comments on commit ead24b1

Please sign in to comment.