services:
    - Rector\NodeTypeResolver\Reflection\BetterReflection\RectorBetterReflectionSourceLocatorFactory
    - Rector\NodeTypeResolver\Reflection\BetterReflection\SourceLocator\IntermediateSourceLocator
    - Rector\NodeTypeResolver\Reflection\BetterReflection\SourceLocatorProvider\DynamicSourceLocatorProvider

    # basically decorates native PHPStan source locator with a dynamic source locator that is also available in Rector DI
    betterReflectionSourceLocator:
        class: PHPStan\BetterReflection\SourceLocator\Type\SourceLocator
        factory: ['@Rector\NodeTypeResolver\Reflection\BetterReflection\RectorBetterReflectionSourceLocatorFactory', 'create']
        autowired: false
