-
Notifications
You must be signed in to change notification settings - Fork 2
/
rector.php
38 lines (30 loc) · 1.26 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
35
36
37
38
<?php
declare(strict_types=1);
use Rector\Core\Configuration\Option;
use Rector\Set\ValueObject\SetList;
use Rector\Symfony\Set\TwigSetList;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Wieni\wmcodestyle\Rector\SetList as WieniSetList;
return static function (ContainerConfigurator $containerConfigurator): void {
$parameters = $containerConfigurator->parameters();
$parameters->set(Option::AUTO_IMPORT_NAMES, true);
$parameters->set(Option::IMPORT_SHORT_CLASSES, false);
$parameters->set(Option::PATHS, [
__DIR__ . '/*.php',
__DIR__ . '/rector',
__DIR__ . '/src',
]);
$parameters->set(Option::SKIP, [
'rector/sets/dependency-injection.php',
'rector/sets/hook-event-dispatcher.php',
]);
$parameters->set(Option::AUTOLOAD_PATHS, [
__DIR__ . '/src',
]);
$containerConfigurator->import(SetList::DEAD_CODE);
$containerConfigurator->import(TwigSetList::TWIG_UNDERSCORE_TO_NAMESPACE);
$containerConfigurator->import(WieniSetList::CODE_QUALITY);
$containerConfigurator->import(WieniSetList::CODING_STYLE);
$containerConfigurator->import(WieniSetList::EARLY_RETURN);
$containerConfigurator->import(WieniSetList::TYPE_DECLARATION);
};