-
-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathrector.php
More file actions
42 lines (39 loc) · 1.82 KB
/
Copy pathrector.php
File metadata and controls
42 lines (39 loc) · 1.82 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
<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPublicMethodParameterRector;
return RectorConfig::configure()
->withPaths([
__DIR__ . '/core',
__DIR__ . '/plugin',
__DIR__ . '/bridge',
])
->withSkip([
__DIR__ . '/bridge/rector',
__DIR__ . '/bridge/symfony-console/resources/stubs',
__DIR__ . '/bin',
'*/tests/*',
'*/Stub/*',
'*/Fixture/*',
// Removing unused public-method parameters breaks implementing classes and callers.
RemoveUnusedPublicMethodParameterRector::class,
// RepeatInterceptor uses a closure with use (&$symbols) for batched symbol flushing;
// Rector's deadCode rules incorrectly remove the body as "unused".
__DIR__ . '/plugin/repeat/src/Internal/RepeatInterceptor.php',
// DeferredGenerator uses `return $result; yield;` to create a finished generator —
// a valid PHP trick that Rector converts to an invalid arrow function.
__DIR__ . '/plugin/data/src/Internal/DeferredGenerator.php',
// CompositeException: constructor-promoting $errors makes the constructor's own
// doc comment awkward to place. Not promoting for now (see #263 review).
__DIR__ . '/plugin/fiber/src/Exception/CompositeException.php',
// Filter.php: large refactor surface, deferred until it can be reviewed on its own (#263).
__DIR__ . '/plugin/filter/Filter.php',
// DefinitionLocator::functionReflection() looks unused today but is kept intentionally —
// don't remove "unused" functions from core (#263).
__DIR__ . '/core/Tokenizer/DefinitionLocator.php',
])
->withPhpSets(php82: true)
->withPreparedSets(
deadCode: false,
typeDeclarations: true,
);