|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/* |
|
4
|
|
|
* This file is part of the Silverback API Components Bundle Project |
|
5
|
|
|
* |
|
6
|
|
|
* (c) Daniel West <[email protected]> |
|
7
|
|
|
* |
|
8
|
|
|
* For the full copyright and license information, please view the LICENSE |
|
9
|
|
|
* file that was distributed with this source code. |
|
10
|
|
|
*/ |
|
11
|
|
|
|
|
12
|
|
|
declare(strict_types=1); |
|
13
|
|
|
|
|
14
|
|
|
use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector; |
|
15
|
|
|
use Rector\Config\RectorConfig; |
|
16
|
|
|
use Rector\Doctrine\Set\DoctrineSetList; |
|
17
|
|
|
use Rector\Set\ValueObject\LevelSetList; |
|
18
|
|
|
use Rector\Symfony\Set\SymfonySetList; |
|
19
|
|
|
|
|
20
|
|
|
return static function (RectorConfig $rectorConfig): void { |
|
21
|
|
|
$rectorConfig->paths([ |
|
22
|
|
|
__DIR__ . '/features', |
|
23
|
|
|
__DIR__ . '/src', |
|
24
|
|
|
__DIR__ . '/tests', |
|
25
|
|
|
]); |
|
26
|
|
|
|
|
27
|
|
|
// register a single rule |
|
28
|
|
|
$rectorConfig->rule(InlineConstructorDefaultToPropertyRector::class); |
|
29
|
|
|
|
|
30
|
|
|
// define sets of rules |
|
31
|
|
|
// $rectorConfig->sets([ |
|
32
|
|
|
// LevelSetList::UP_TO_PHP_81 |
|
33
|
|
|
// ]); |
|
34
|
|
|
$rectorConfig->sets([ |
|
35
|
|
|
DoctrineSetList::ANNOTATIONS_TO_ATTRIBUTES, |
|
36
|
|
|
SymfonySetList::ANNOTATIONS_TO_ATTRIBUTES, |
|
37
|
|
|
]); |
|
38
|
|
|
}; |
|
39
|
|
|
|