Project

General

Profile

Download (1.08 KB) Statistics
| Branch: | Tag: | Revision:
1 bfa54b82 Christian McDonald
<?php
2
declare(strict_types=1);
3
4
use Rector\Config\RectorConfig;
5
6 255a18ee Christian McDonald
use Tools\Rector\Rector\Rules;
7
8 bfa54b82 Christian McDonald
return static function (RectorConfig $rectorConfig): void {
9 f4970dcd Christian McDonald
    // Recursively check these paths...
10 bfa54b82 Christian McDonald
    $rectorConfig->paths([
11
        __DIR__ . '/src',
12
    ]);
13
14 f4970dcd Christian McDonald
    // for files with these extensions...
15
    $rectorConfig->fileExtensions([
16
        'php',
17
        'inc',
18
    ]);
19
20
    // while skipping third-pary code that isn't our concern.
21
    $rectorConfig->skip([
22
        __DIR__ . '/src/usr/local/pfSense/include/vendor/*',
23 255a18ee Christian McDonald
    	__DIR__ . '/src/etc/inc/priv.defs.inc',
24 f4970dcd Christian McDonald
    ]);
25 bfa54b82 Christian McDonald
26 f4970dcd Christian McDonald
    /*
27
     * Register Rector rules or rulesets here
28
     *
29
     * See https://github.com/rectorphp/rector#running-rector
30
     *
31
     * Place custom Rectors in tools/rector/src/Rector named
32
     * SomeDescriptiveNameRector.php namespaced as "Tools\Rector\Rector".
33
     * Class should be "final" qualified, extend AbstractRector
34
     * and the same name as the filename.
35
     *
36
     * See https://github.com/rectorphp/rector/blob/main/docs/create_own_rule.md
37
     */ 
38 255a18ee Christian McDonald
39
    $rectorConfig->rule(Rules\GlobalGGetExprRector::class);
40 bfa54b82 Christian McDonald
};