forked from ezsystems/JMSJobQueueBundle
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrector.php
More file actions
56 lines (48 loc) · 1.59 KB
/
rector.php
File metadata and controls
56 lines (48 loc) · 1.59 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\Doctrine\Set\DoctrineSetList;
use Rector\Doctrine\Orm214\Rector\Param\ReplaceLifecycleEventArgsByDedicatedEventArgsRector;
use Rector\Php74\Rector\Property\RestoreDefaultNullToNullableTypePropertyRector;
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictNativeCallRector;
use Rector\TypeDeclaration\Rector\StmtsAwareInterface\DeclareStrictTypesRector;
return RectorConfig::configure()
// paths & skips
->withPaths([
__DIR__ . '/Command',
__DIR__ . '/Controller',
__DIR__ . '/Entity',
__DIR__ . '/DependencyInjection',
__DIR__ . '/Event',
__DIR__ . '/Twig',
__DIR__ . '/Tests',
__DIR__ . '/Resources',
])
->withSkip([
__DIR__ . '/vendor',
__DIR__ . '/var',
__DIR__ . '/.git',
__DIR__ . '/Dockerfile',
__DIR__ . '/docker-compose.yml',
__DIR__ . '/node_modules',
])
// imports (same behavior as your importNames(false, true))
->withImportNames(
removeUnusedImports: true,
importShortClasses: false
)
// individual rules
->withRules([
ReplaceLifecycleEventArgsByDedicatedEventArgsRector::class,
RestoreDefaultNullToNullableTypePropertyRector::class,
ReturnTypeFromStrictNativeCallRector::class,
DeclareStrictTypesRector::class,
])
// any non-annotation sets you still want
->withSets([
DoctrineSetList::DOCTRINE_CODE_QUALITY,
])
->withAttributesSets(
doctrine: true,
symfony: true
);