-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrector.php
More file actions
32 lines (29 loc) · 894 Bytes
/
Copy pathrector.php
File metadata and controls
32 lines (29 loc) · 894 Bytes
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
<?php
/**
* Rector configuration.
*
* Targets PHP 7.4 (the project floor) so no PHP 8-only refactors are
* suggested, and applies the dead-code and code-quality prepared sets. Run
* `composer rector` for a dry-run; never auto-fix in CI.
*
* @package CartRebound
*/
declare( strict_types=1 );
use Rector\Config\RectorConfig;
use Rector\DeadCode\Rector\ClassMethod\RemoveUselessReturnTagRector;
use Rector\ValueObject\PhpVersion;
return RectorConfig::configure()
->withPaths( array( __DIR__ . '/src' ) )
->withPhpVersion( PhpVersion::PHP_74 )
->withPreparedSets(
deadCode: true,
codeQuality: true
)
->withSkip(
array(
// WordPress-Docs (PHPCS) REQUIRES an explicit @return tag on every
// function, so this dead-code rule is intentionally disabled to
// avoid the two tools fighting over @return void / @return bool.
RemoveUselessReturnTagRector::class,
)
);