-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrector.php
More file actions
54 lines (43 loc) · 1.21 KB
/
rector.php
File metadata and controls
54 lines (43 loc) · 1.21 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
44
45
46
47
48
49
50
51
52
53
54
<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;
use Rector\ValueObject\PhpVersion;
/*
* Standard Rector Configuration for Laravel Modules
*
* Minimal configuration compatible with base Rector installation
* Updated: 2025-11-24
*/
return static function (RectorConfig $rectorConfig): void {
// Paths to analyze
$rectorConfig->paths([
__DIR__,
]);
// Paths to skip
$rectorConfig->skip([
__DIR__.'/vendor',
__DIR__.'/docs',
__DIR__.'/tests/coverage',
]);
// PHP version target
$rectorConfig->phpVersion(PhpVersion::PHP_81);
// Rule sets
$rectorConfig->sets([
// PHP 8.1 compatibility
LevelSetList::UP_TO_PHP_81,
// Code quality improvements
SetList::CODE_QUALITY,
SetList::DEAD_CODE,
SetList::EARLY_RETURN,
// Type declarations (commented - enable carefully)
// SetList::TYPE_DECLARATION,
// Coding style
// SetList::CODING_STYLE,
]);
// Import names for cleaner code
$rectorConfig->importNames();
// Import short classes
$rectorConfig->importShortClasses(false);
};