This repository has been archived by the owner on May 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rector.php
34 lines (30 loc) · 1.52 KB
/
rector.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
declare(strict_types=1);
use Rector\Core\Configuration\Option;
use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPromotedPropertyRector;
use Rector\Privatization\Rector\Class_\FinalizeClassesWithoutChildrenRector;
use Rector\Set\ValueObject\SetList;
use Rector\TypeDeclaration\Rector\ClassMethod\AddArrayParamDocTypeRector;
use Rector\TypeDeclaration\Rector\ClassMethod\AddArrayReturnDocTypeRector;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
return static function (ContainerConfigurator $containerConfigurator): void {
$containerConfigurator->import(SetList::CODE_QUALITY);
$containerConfigurator->import(SetList::DEAD_CODE);
$containerConfigurator->import(SetList::PHP_74);
$containerConfigurator->import(SetList::PHP_80);
$containerConfigurator->import(SetList::PRIVATIZATION);
$containerConfigurator->import(SetList::PSR_4);
$containerConfigurator->import(SetList::SAFE_07);
$containerConfigurator->import(SetList::TYPE_DECLARATION);
$containerConfigurator->import(SetList::TYPE_DECLARATION_STRICT);
$containerConfigurator->import(SetList::EARLY_RETURN);
$containerConfigurator
->parameters()
->set(Option::PATHS, [__DIR__ . '/src/', __DIR__ . '/tests/'])
->set(Option::SKIP, [
AddArrayReturnDocTypeRector::class,
AddArrayParamDocTypeRector::class,
RemoveUnusedPromotedPropertyRector::class,
FinalizeClassesWithoutChildrenRector::class => [__DIR__ . '/tests/Support'],
]);
};