-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrector.php
29 lines (24 loc) · 1.03 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
<?php declare(strict_types=1);
use Rector\CodeQuality\Rector\Concat\JoinStringConcatRector;
use Rector\Config\RectorConfig;
use Rector\Set\ValueObject\SetList;
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->import(SetList::CODE_QUALITY);
$rectorConfig->import(SetList::PHP_71);
$rectorConfig->import(SetList::PHP_72);
$rectorConfig->import(SetList::PHP_73);
$rectorConfig->import(SetList::PHP_74);
$rectorConfig->import(SetList::PHP_80);
$rectorConfig->import(SetList::PHP_81);
$rectorConfig->skip([
// skip csv test file to keep `\r` and `\n` for readability
JoinStringConcatRector::class => [
// single file
__DIR__ . '/tests/Unit/CSVArrayTest.php',
],
]);
// paths to refactor; solid alternative to CLI arguments
$rectorConfig->paths([__DIR__ . '/src', __DIR__ . '/tests']);
// Path to PHPStan with extensions, that PHPStan in Rector uses to determine types
$rectorConfig->phpstanConfig(__DIR__ . '/phpstan.neon');
};