mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-19 14:27:14 +01:00
55cb627074
7b8f4deae2
[CodeQuality] Skip FixClassCaseSensitivityNameRector on function name exists (#660)
17 lines
1.1 KiB
PHP
17 lines
1.1 KiB
PHP
<?php
|
|
|
|
declare (strict_types=1);
|
|
namespace RectorPrefix20210813;
|
|
|
|
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;
|
|
use Symplify\SymfonyPhpConfig\ValueObjectInliner;
|
|
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)->call('configure', [[\Rector\TypeDeclaration\Rector\ClassMethod\AddReturnTypeDeclarationRector::METHOD_RETURN_TYPES => \Symplify\SymfonyPhpConfig\ValueObjectInliner::inline([new \Rector\TypeDeclaration\ValueObject\AddReturnTypeDeclaration('PhpSpec\\ObjectBehavior', 'getMatchers', $arrayType)])]]);
|
|
};
|