build: update Rector config to PHP

This commit is contained in:
Owen Voke
2020-08-12 13:00:19 +01:00
parent 943707cbcd
commit 98ed779424
2 changed files with 31 additions and 18 deletions

31
rector.php Normal file
View File

@ -0,0 +1,31 @@
<?php
declare(strict_types=1);
use Rector\Core\Configuration\Option;
use Rector\Set\ValueObject\SetList;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
return static function (ContainerConfigurator $containerConfigurator): void {
$parameters = $containerConfigurator->parameters();
$parameters->set(Option::AUTO_IMPORT_NAMES, true);
$parameters->set(Option::SETS, [
SetList::ACTION_INJECTION_TO_CONSTRUCTOR_INJECTION,
SetList::ARRAY_STR_FUNCTIONS_TO_STATIC_CALL,
SetList::CODE_QUALITY,
SetList::PHP_53,
SetList::PHP_54,
SetList::PHP_56,
SetList::PHP_70,
SetList::PHP_71,
SetList::PHP_72,
SetList::PHP_73,
SetList::PHPSTAN,
SetList::PHPUNIT_CODE_QUALITY,
SetList::SOLID,
]);
$parameters->set(Option::PATHS, [__DIR__.'/src', __DIR__.'/tests']);
};

View File

@ -1,18 +0,0 @@
# rector.yaml
parameters:
sets:
- 'action-injection-to-constructor-injection'
- 'array-str-functions-to-static-call'
- 'phpstan'
- 'phpunit-code-quality'
- 'solid'
- 'doctrine-code-quality'
- 'code-quality'
- 'php53'
- 'php54'
- 'php55'
- 'php56'
- 'php70'
- 'php71'
- 'php72'
- 'php73'