3131use PHPStan \Type \FileTypeMapper ;
3232use PHPStan \Type \Type ;
3333use PHPStan \Type \VerbosityLevel ;
34+ use PHPUnit \Framework \Attributes \RunTestsInSeparateProcesses ;
3435use Symfony \Component \Finder \Finder ;
3536use function array_map ;
3637use function array_merge ;
@@ -56,33 +57,34 @@ abstract class TypeInferenceTestCase extends PHPStanTestCase
5657 protected static function createNodeScopeResolver (): NodeScopeResolver |GeneratorNodeScopeResolver
5758 {
5859 $ reflectionProvider = self ::createReflectionProvider ();
59- $ typeSpecifier = self ::getContainer ()->getService ('typeSpecifier ' );
60+ $ container = self ::getContainer ();
61+ $ typeSpecifier = $ container ->getService ('typeSpecifier ' );
6062
6163 return new NodeScopeResolver (
6264 $ reflectionProvider ,
63- self :: getContainer () ->getByType (InitializerExprTypeResolver::class),
65+ $ container ->getByType (InitializerExprTypeResolver::class),
6466 self ::getReflector (),
65- self :: getContainer () ->getByType (ClassReflectionFactory::class),
66- self :: getContainer () ->getByType (ParameterOutTypeExtensionProvider::class),
67+ $ container ->getByType (ClassReflectionFactory::class),
68+ $ container ->getByType (ParameterOutTypeExtensionProvider::class),
6769 self ::getParser (),
68- self :: getContainer () ->getByType (FileTypeMapper::class),
69- self :: getContainer () ->getByType (PhpVersion::class),
70- self :: getContainer () ->getByType (PhpDocInheritanceResolver::class),
71- self :: getContainer () ->getByType (FileHelper::class),
70+ $ container ->getByType (FileTypeMapper::class),
71+ $ container ->getByType (PhpVersion::class),
72+ $ container ->getByType (PhpDocInheritanceResolver::class),
73+ $ container ->getByType (FileHelper::class),
7274 $ typeSpecifier ,
73- self :: getContainer () ->getByType (DynamicThrowTypeExtensionProvider::class),
74- self :: getContainer () ->getByType (ReadWritePropertiesExtensionProvider::class),
75- self :: getContainer () ->getByType (ParameterClosureThisExtensionProvider::class),
76- self :: getContainer () ->getByType (ParameterClosureTypeExtensionProvider::class),
75+ $ container ->getByType (DynamicThrowTypeExtensionProvider::class),
76+ $ container ->getByType (ReadWritePropertiesExtensionProvider::class),
77+ $ container ->getByType (ParameterClosureThisExtensionProvider::class),
78+ $ container ->getByType (ParameterClosureTypeExtensionProvider::class),
7779 self ::createScopeFactory ($ reflectionProvider , $ typeSpecifier ),
78- self :: getContainer () ->getParameter ('polluteScopeWithLoopInitialAssignments ' ),
79- self :: getContainer () ->getParameter ('polluteScopeWithAlwaysIterableForeach ' ),
80- self :: getContainer () ->getParameter ('polluteScopeWithBlock ' ),
80+ $ container ->getParameter ('polluteScopeWithLoopInitialAssignments ' ),
81+ $ container ->getParameter ('polluteScopeWithAlwaysIterableForeach ' ),
82+ $ container ->getParameter ('polluteScopeWithBlock ' ),
8183 static ::getEarlyTerminatingMethodCalls (),
8284 static ::getEarlyTerminatingFunctionCalls (),
83- self :: getContainer () ->getParameter ('exceptions ' )['implicitThrows ' ],
84- self :: getContainer () ->getParameter ('treatPhpDocTypesAsCertain ' ),
85- self :: getContainer () ->getParameter ('narrowMethodScopeFromConstructor ' ),
85+ $ container ->getParameter ('exceptions ' )['implicitThrows ' ],
86+ $ container ->getParameter ('treatPhpDocTypesAsCertain ' ),
87+ $ container ->getParameter ('narrowMethodScopeFromConstructor ' ),
8688 );
8789 }
8890
0 commit comments