mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
build: update Rector config to PHP
This commit is contained in:
31
rector.php
Normal file
31
rector.php
Normal 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']);
|
||||||
|
};
|
||||||
18
rector.yaml
18
rector.yaml
@ -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'
|
|
||||||
Reference in New Issue
Block a user