Skip to content

Commit d7a1f7a

Browse files
committed
Update rector config
1 parent 38d6458 commit d7a1f7a

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

rector.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,28 @@
33
use Rector\Core\Configuration\Option;
44
use Rector\Core\ValueObject\PhpVersion;
55
use Rector\Set\ValueObject\DowngradeSetList;
6-
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
6+
use Rector\Config\RectorConfig;
77

88
/** Define ABSPATH as this file's directory */
99
if (!defined('ABSPATH')) {
1010
define('ABSPATH', __DIR__ . '/vendor/wordpress/wordpress/');
1111
}
1212

13-
return static function (ContainerConfigurator $containerConfigurator): void {
13+
return static function (RectorConfig $rectorConfig): void {
1414
// get parameters
15-
$parameters = $containerConfigurator->parameters();
15+
$parameters = $rectorConfig->parameters();
1616

1717
// paths to refactor; solid alternative to CLI arguments
18-
$parameters->set(Option::PATHS, [
18+
$rectorConfig->paths( [
1919
__DIR__ . '/src',
2020
__DIR__ . '/vendor_prefixed',
2121
__DIR__ . '/vendor/htmlburger/carbon-fields',
22-
]);
22+
] );
2323

24-
$parameters->set(Option::SKIP, [
24+
$rectorConfig->skip( [
2525
__DIR__ . '/src/_js',
2626
__DIR__ . '/src/_scss',
27-
]);
27+
] );
2828

2929
// Rector is static reflection to load code without running it - see https://phpstan.org/blog/zero-config-analysis-with-static-reflection
3030
$parameters->set(Option::AUTOLOAD_PATHS, [
@@ -43,8 +43,8 @@
4343
$parameters->set(Option::PHPSTAN_FOR_RECTOR_PATH, __DIR__ . '/phpstan.neon.dist');
4444

4545
// here we can define, what sets of rules will be applied
46-
$containerConfigurator->import( DowngradeSetList::PHP_80 );
47-
$containerConfigurator->import( DowngradeSetList::PHP_74 );
48-
$containerConfigurator->import( DowngradeSetList::PHP_73 );
49-
$containerConfigurator->import( DowngradeSetList::PHP_72 );
46+
$rectorConfig->import( DowngradeSetList::PHP_80 );
47+
$rectorConfig->import( DowngradeSetList::PHP_74 );
48+
$rectorConfig->import( DowngradeSetList::PHP_73 );
49+
$rectorConfig->import( DowngradeSetList::PHP_72 );
5050
};

0 commit comments

Comments
 (0)