services:
    _defaults:
        public: true
        autowire: true

    Rector\NodeTypeResolver\:
        resource: '../src'
        exclude: '../src/{Contract,Php/*Info.php}'

    Rector\Php\TypeAnalyzer: ~
    Rector\FileSystem\FilesFinder: ~
    Rector\PhpParser\Printer\BetterStandardPrinter: ~
    Rector\PhpParser\Node\BetterNodeFinder: ~

    # PHPStan
    PHPStan\Broker\Broker:
        factory: ['@Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory', 'createBroker']

    PHPStan\Analyser\NodeScopeResolver:
        factory: ['@Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory', 'createNodeScopeResolver']

    PHPStan\Analyser\TypeSpecifier:
        factory: ['@Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory', 'createTypeSpecifier']

    PHPStan\Analyser\ScopeFactory:
        factory: ['@Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory', 'createScopeFactory']
