-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrector.php
53 lines (46 loc) · 2.27 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
/**
* Copyright © 2021-present Spryker Systems GmbH. All rights reserved.
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
*/
use Rector\CodeQuality\Rector\Array_\CallableThisArrayToAnonymousFunctionRector;
use Rector\CodeQuality\Rector\If_\ConsecutiveNullCompareReturnsToNullCoalesceQueueRector;
use Rector\Config\RectorConfig;
use Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector;
use Rector\Set\ValueObject\SetList;
use Rector\Strict\Rector\Ternary\BooleanInTernaryOperatorRuleFixerRector;
use Rector\DeadCode\Rector\ClassMethod\RemoveUselessParamTagRector;
use Rector\TypeDeclaration\Rector\ClassMethod\AddParamTypeFromPropertyTypeRector;
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->paths([
__DIR__ . '/src/Spryker',
__DIR__ . '/tests/SprykerTest',
]);
$rectorConfig->skip([
'*/_support/_generated/*',
]);
$rectorConfig->import(SetList::CODE_QUALITY);
$rectorConfig->import(SetList::CODING_STYLE);
$rectorConfig->import(SetList::DEAD_CODE);
$rectorConfig->import(SetList::STRICT_BOOLEANS);
$rectorConfig->import(SetList::NAMING);
$rectorConfig->import(SetList::PHP_82);
$rectorConfig->import(SetList::TYPE_DECLARATION);
$rectorConfig->import(SetList::EARLY_RETURN);
$rectorConfig->import(SetList::INSTANCEOF);
$rectorConfig->ruleWithConfiguration(ClassPropertyAssignToConstructorPromotionRector::class, [
ClassPropertyAssignToConstructorPromotionRector::INLINE_PUBLIC => true,
]);
$rectorConfig->skip([
// Ignore this rule on the AppRouteProviderPlugin as it breaks the code
CallableThisArrayToAnonymousFunctionRector::class => [
__DIR__ . '/src/Spryker/Glue/AppWebhookBackendApi/Plugin/GlueApplication/AppWebhookBackendApiRouteProviderPlugin.php',
],
ClassPropertyAssignToConstructorPromotionRector::class => [
__DIR__ . '/src/Spryker/Glue/AppWebhookBackendApi/Dependency/Facade/AppWebhookBackendApiToAppWebhookFacadeBridge.php',
],
AddParamTypeFromPropertyTypeRector::class => [
__DIR__ . '/src/Spryker/Glue/AppWebhookBackendApi/Dependency/Facade/AppWebhookBackendApiToAppWebhookFacadeBridge.php',
],
]);
};