-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathrector.php
More file actions
45 lines (42 loc) · 1.48 KB
/
rector.php
File metadata and controls
45 lines (42 loc) · 1.48 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
<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\Doctrine\Set\DoctrineSetList;
use Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector;
use Rector\PHPUnit\Set\PHPUnitSetList;
use Rector\Symfony\Set\SymfonySetList;
use Rector\TypeDeclaration\Rector\ClassMethod\AddVoidReturnTypeWhereNoReturnRector;
return RectorConfig::configure()
->withPaths([
__DIR__ . '/config',
__DIR__ . '/migrations',
__DIR__ . '/public',
__DIR__ . '/src',
__DIR__ . '/templates',
__DIR__ . '/tests',
])
->withRootFiles()
->withImportNames(importShortClasses: false)
->withTypeCoverageLevel(0)
->withDeadCodeLevel(0)
->withCodeQualityLevel(0)
->withRules([
AddVoidReturnTypeWhereNoReturnRector::class,
])
->withPhpSets()
->withSets([
DoctrineSetList::ANNOTATIONS_TO_ATTRIBUTES,
SymfonySetList::ANNOTATIONS_TO_ATTRIBUTES,
DoctrineSetList::GEDMO_ANNOTATIONS_TO_ATTRIBUTES,
// PHPUnitSetList::PHPUNIT_110,
])
->withAttributesSets(symfony: true, doctrine: true, gedmo: true, jms: true, sensiolabs: true)
->withComposerBased(twig: true, doctrine: true, phpunit: true, symfony: true)
->withConfiguredRule(ClassPropertyAssignToConstructorPromotionRector::class, [
'inline_public' => true,
])
->withSkip([
ClassPropertyAssignToConstructorPromotionRector::class => [
__DIR__ . '/src/Entity/*',
],
]);