forked from nuwave/lighthouse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrector.php
26 lines (22 loc) · 1002 Bytes
/
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
<?php
use Rector\Core\Configuration\Option;
use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedParameterRector;
use Rector\Set\ValueObject\SetList;
use Rector\SOLID\Rector\ClassMethod\UseInterfaceOverImplementationInConstructorRector;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
return static function (ContainerConfigurator $containerConfigurator): void {
$parameters = $containerConfigurator->parameters();
$parameters->set(Option::SETS, [
SetList::CODE_QUALITY,
SetList::DEAD_CODE,
SetList::PHPUNIT_EXCEPTION,
SetList::PHPUNIT_SPECIFIC_METHOD,
SetList::PHPUNIT_YIELD_DATA_PROVIDER,
]);
$parameters->set(Option::EXCLUDE_RECTORS, [
// Laravel classes are sometimes multi-purpose or magical
UseInterfaceOverImplementationInConstructorRector::class,
// Having unused parameters can increase clarity, e.g. in event handlers
RemoveUnusedParameterRector::class,
]);
};