-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrector.php
39 lines (35 loc) · 1.22 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
39
<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector;
use Rector\Set\ValueObject\SetList;
use Rector\TypeDeclaration\Rector\ClassMethod\AddVoidReturnTypeWhereNoReturnRector;
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector;
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromStrictSetUpRector;
return RectorConfig::configure()
->withPaths([
__DIR__ . '/app',
__DIR__ . '/src',
__DIR__ . '/tests',
__DIR__ . '/web',
])
->withImportNames()
->withPhpSets(php74: true)
->withSets([SetList::TYPE_DECLARATION]) //rule to force typed declarations
->withRules([
AddVoidReturnTypeWhereNoReturnRector::class,
])
->withSkip([
/*
* See https://jira.publiq.be/browse/III-6139
Remove these skips once we upgrade to PHP 8, and we have a union type
Currently it will change code:
@var RegionServiceInterface|MockObject
to:
private MockObject;
breaking the code.
*/
TypedPropertyFromStrictSetUpRector::class,
TypedPropertyFromAssignsRector::class,
// End skipping until PHP 8
]);