Repository navigation
Expand file tree
/
Copy pathrector.php
More file actions
43 lines (40 loc) · 1.43 KB
/
Copy pathrector.php
File metadata and controls
43 lines (40 loc) · 1.43 KB
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
<?php declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\PHPUnit\Set\PHPUnitSetList;
use Rector\Set\ValueObject\SetList;
use function MLL\RectorConfig\laravel;
return static function (RectorConfig $rectorConfig): void {
laravel($rectorConfig);
$rectorConfig->sets([
SetList::CODE_QUALITY,
SetList::PHP_71,
SetList::PHP_72,
SetList::PHP_73,
SetList::PHP_74,
SetList::PHP_80,
SetList::PHP_81,
SetList::PHP_82,
PHPUnitSetList::PHPUNIT_CODE_QUALITY,
PHPUnitSetList::ANNOTATIONS_TO_ATTRIBUTES,
]);
$rectorConfig->importNames();
$rectorConfig->importShortClasses(false);
$rectorConfig->rule(Rector\PHPUnit\CodeQuality\Rector\Class_\PreferPHPUnitSelfCallRector::class);
$rectorConfig->skip([
// Unsafe with typed properties
Rector\CodeQuality\Rector\Isset_\IssetOnPropertyObjectToPropertyExistsRector::class,
]);
$rectorConfig->paths([
__DIR__ . '/src',
__DIR__ . '/tests',
]);
$rectorConfig->bootstrapFiles([
// Rector uses PHPStan internally, which in turn requires Larastan to be set up correctly
__DIR__ . '/vendor/larastan/larastan/bootstrap.php',
]);
$rectorConfig->phpstanConfigs([
__DIR__ . '/phpstan.neon',
__DIR__ . '/vendor/larastan/larastan/extension.neon',
__DIR__ . '/vendor/spaze/phpstan-disallowed-calls/extension.neon',
]);
};