-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathrector.php
37 lines (33 loc) · 895 Bytes
/
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
<?php
/**
* Rector configuration
*
* @package Gamajo\PluginSlug
* @author Gary Jones
* @copyright 2024 Gary Jones
* @license GPL-2.0-or-later
*/
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\Php83\Rector\ClassMethod\AddOverrideAttributeToOverriddenMethodsRector;
use Rector\Php84\Rector\Param\ExplicitNullableParamTypeRector;
return RectorConfig::configure()
->withPaths(
[
__DIR__ . '/src',
__DIR__ . '/tests',
__DIR__ . '/views',
__DIR__ . '/plugin-slug.php',
]
)
->withPhpSets( php82: true )
// Changes from later PHP Sets that are backwards compatible.
->withRules(
[
// 8.3.
AddOverrideAttributeToOverriddenMethodsRector::class,
// 8.4.
ExplicitNullableParamTypeRector::class,
]
)
->withPreparedSets( deadCode: true, codeQuality: true, instanceOf: true, codingStyle: true, typeDeclarations: true );