From ead24b10f62017b192b37db835f149f5bdcd6043 Mon Sep 17 00:00:00 2001 From: skyler544 <64664938+skyler544@users.noreply.github.com> Date: Wed, 29 Jan 2025 22:43:43 +0100 Subject: [PATCH] prevent generation of incorrect property annotation (#1665) Co-authored-by: Skyler Mayfield --- src/Console/ModelsCommand.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Console/ModelsCommand.php b/src/Console/ModelsCommand.php index 9b1f2c3..095fab6 100644 --- a/src/Console/ModelsCommand.php +++ b/src/Console/ModelsCommand.php @@ -628,6 +628,10 @@ class ModelsCommand extends Command ) ); }); + // 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);