2525 */
2626final class MakeFactoryData
2727{
28- public const STATIC_ANALYSIS_TOOL_NONE = 'none ' ;
29- public const STATIC_ANALYSIS_TOOL_PHPSTAN = 'phpstan ' ;
30- public const STATIC_ANALYSIS_TOOL_PSALM = 'psalm ' ;
31-
3228 private static ?ReflectionExtractor $ propertyInfo = null ;
3329
3430 /** @var list<string> */
3531 private array $ uses ;
3632 /** @var array<string, string> */
3733 private array $ defaultProperties = [];
38- /** @var list<MakeFactoryPHPDocMethod> */
39- private array $ methodsInPHPDoc ;
4034
4135 public function __construct (
4236 private \ReflectionClass $ object ,
4337 private ClassNameDetails $ factoryClassNameDetails ,
4438 private ?\ReflectionClass $ repository ,
45- private string $ staticAnalysisTool ,
4639 private bool $ persisted ,
47- bool $ withPhpDoc ,
4840 private bool $ forceProperties ,
4941 private bool $ addHints ,
5042 ) {
@@ -60,8 +52,6 @@ public function __construct(
6052 $ this ->uses [] = \is_a ($ repository ->getName (), DocumentRepository::class, allow_string: true ) ? DocumentRepository::class : EntityRepository::class;
6153 }
6254 }
63-
64- $ this ->methodsInPHPDoc = $ withPhpDoc ? MakeFactoryPHPDocMethod::createAll ($ this ) : [];
6555 }
6656
6757 // @phpstan-ignore-next-line
@@ -109,16 +99,6 @@ public function isPersisted(): bool
10999 return $ this ->persisted ;
110100 }
111101
112- public function staticAnalysisTool (): string
113- {
114- // if none was detected, let's fallback on phpstan: both psalm and phpstan can read `@phpstan` annotations
115- if (self ::STATIC_ANALYSIS_TOOL_NONE === $ this ->staticAnalysisTool ) {
116- return self ::STATIC_ANALYSIS_TOOL_PHPSTAN ;
117- }
118-
119- return $ this ->staticAnalysisTool ;
120- }
121-
122102 /** @param class-string $use */
123103 public function addUse (string $ use ): void
124104 {
@@ -175,18 +155,6 @@ public function getDefaultProperties(): array
175155 return $ defaultProperties ;
176156 }
177157
178- /** @return list<MakeFactoryPHPDocMethod> */
179- public function getMethodsPHPDoc (): array
180- {
181- $ methodsInPHPDoc = $ this ->methodsInPHPDoc ;
182- \usort (
183- $ methodsInPHPDoc ,
184- static fn (MakeFactoryPHPDocMethod $ m1 , MakeFactoryPHPDocMethod $ m2 ) => $ m1 ->sortValue () <=> $ m2 ->sortValue (),
185- );
186-
187- return $ methodsInPHPDoc ;
188- }
189-
190158 public function addEnumDefaultProperty (string $ propertyName , string $ enumClass ): void
191159 {
192160 if (\PHP_VERSION_ID < 80100 ) {
0 commit comments