rector/config/set/phpspec40.php
Tomas Votruba 1c5290301d Updated Rector to commit 2468277687fd94c110f824ce27c7850b4b351b33
2468277687 [TypeDeclaration] Handle infered ThisType on auto import on ReturnTypeDeclarationRector (#1760)
2022-02-02 09:10:44 +00:00

16 lines
886 B
PHP

<?php
declare (strict_types=1);
namespace RectorPrefix20220202;
use PHPStan\Type\ArrayType;
use PHPStan\Type\MixedType;
use Rector\TypeDeclaration\Rector\ClassMethod\AddReturnTypeDeclarationRector;
use Rector\TypeDeclaration\ValueObject\AddReturnTypeDeclaration;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
return static function (\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
$services = $containerConfigurator->services();
$arrayType = new \PHPStan\Type\ArrayType(new \PHPStan\Type\MixedType(), new \PHPStan\Type\MixedType());
$services->set(\Rector\TypeDeclaration\Rector\ClassMethod\AddReturnTypeDeclarationRector::class)->configure([new \Rector\TypeDeclaration\ValueObject\AddReturnTypeDeclaration('PhpSpec\\ObjectBehavior', 'getMatchers', $arrayType)]);
};