-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrector.sample.php
More file actions
44 lines (37 loc) · 2.27 KB
/
rector.sample.php
File metadata and controls
44 lines (37 loc) · 2.27 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
<?php
declare(strict_types=1);
use Rector\Configuration\RectorConfigBuilder;
/** @var RectorConfigBuilder $rectorConfig */
$rectorConfig = require 'vendor/rapidez/coding-standards/rector.php';
$rectorConfig->withPaths([
__DIR__ . '/app',
__DIR__ . '/config',
__DIR__ . '/routes',
__DIR__ . '/resources',
__DIR__ . '/tests',
// __DIR__ . '/packages',
// __DIR__ . '/modules',
]);
/** Define additional rules here
* @see: https://getrector.com/find-rule?activeRectorSetGroup=laravel
* @see: https://getrector.com/find-rule?activeRectorSetGroup=php
* @see: https://getrector.com/find-rule?activeRectorSetGroup=core
*/
/** @see: https://getrector.com/documentation/levels */
$rectorConfig->withTypeCoverageDocblockLevel(0); // 1 is least intrusive changes, higher is more intrusive
$rectorConfig->withTypeCoverageLevel(0); // 1 is least intrusive changes, higher is more intrusive
$rectorConfig->withCodeQualityLevel(0); // 1 is least intrusive changes, higher is more intrusive
$rectorConfig->withCodingStyleLevel(0); // 1 is least intrusive changes, higher is more intrusive
$rectorConfig->withDeadCodeLevel(0); // 1 is least intrusive changes, higher is more intrusive
$rectorConfig->withPreparedSets(
// Only enable these when the levels above are completed and their config is removed
// It will automatically set their level to the highest possible.
// typeDeclarationDocblocks: true, // https://getrector.com/find-rule?rectorSet=core-type-declarations&activeRectorSetGroup=core
// typeDeclarations: true, // https://getrector.com/find-rule?activeRectorSetGroup=core&rectorSet=core-type-declarations
// codeQuality: true, // https://getrector.com/find-rule?activeRectorSetGroup=core&rectorSet=core-code-quality
// codingStyle: true, // https://getrector.com/find-rule?activeRectorSetGroup=core&rectorSet=core-coding-style
// deadCode: true, // https://getrector.com/find-rule?activeRectorSetGroup=core&rectorSet=core-dead-code
instanceOf: false, // https://getrector.com/find-rule?rectorSet=core-instanceof&activeRectorSetGroup=core
earlyReturn: false, // https://getrector.com/find-rule?rectorSet=core-early-return&activeRectorSetGroup=core
);
return $rectorConfig;