forked from laravel/ai
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrector.php
More file actions
50 lines (47 loc) · 2.24 KB
/
Copy pathrector.php
File metadata and controls
50 lines (47 loc) · 2.24 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
<?php
declare(strict_types=1);
use Rector\CodingStyle\Rector\Encapsed\EncapsedStringsToSprintfRector;
use Rector\Config\RectorConfig;
use Rector\DeadCode\Rector\For_\RemoveDeadIfForeachForRector;
use Rector\DeadCode\Rector\For_\RemoveDeadLoopRector;
use Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector;
use Rector\Php81\Rector\Property\ReadOnlyPropertyRector;
use Rector\Strict\Rector\Empty_\DisallowedEmptyRuleFixerRector;
use Rector\TypeDeclaration\Rector\FuncCall\AddArrayFunctionClosureParamTypeRector;
use Rector\TypeDeclaration\Rector\FunctionLike\AddClosureParamTypeForArrayMapRector;
use Rector\TypeDeclaration\Rector\FunctionLike\AddClosureParamTypeForArrayReduceRector;
use Rector\TypeDeclaration\Rector\StmtsAwareInterface\SafeDeclareStrictTypesRector;
use RectorLaravel\Rector\Class_\TablePropertyToTableAttributeRector;
use RectorLaravel\Set\LaravelSetProvider;
return RectorConfig::configure()
->withPaths([
__DIR__.'/src',
__DIR__.'/tests',
])
->withSkip([
ReadOnlyPropertyRector::class,
EncapsedStringsToSprintfRector::class,
DisallowedEmptyRuleFixerRector::class,
// Renames public constructor parameters (e.g. mimeType -> mime), breaking named-argument callers.
ClassPropertyAssignToConstructorPromotionRector::class,
// Infers closure param types too narrowly for polymorphic tool lists (Tool|Agent), causing TypeErrors.
AddClosureParamTypeForArrayMapRector::class,
AddClosureParamTypeForArrayReduceRector::class,
AddArrayFunctionClosureParamTypeRector::class,
// Deletes empty-bodied loops, but iterating a generator (e.g. draining a stream) has side effects and must be kept.
RemoveDeadLoopRector::class,
RemoveDeadIfForeachForRector::class,
// Skipped for now to keep the diff focused (no declare(strict_types=1) churn).
SafeDeclareStrictTypesRector::class,
TablePropertyToTableAttributeRector::class,
])
->withPreparedSets(
deadCode: true,
codeQuality: true,
codingStyle: true,
typeDeclarations: true,
earlyReturn: true,
)
->withPhpSets(php81: true)
->withSetProviders(LaravelSetProvider::class)
->withComposerBased(laravel: true);