Project

General

Profile

Download (1.17 KB) Statistics
| Branch: | Tag: | Revision:
1
<?php
2
declare(strict_types=1);
3

    
4
use Rector\Config\RectorConfig;
5

    
6
use Tools\Rector\Rector\Rules;
7

    
8
return static function (RectorConfig $rectorConfig): void {
9
    // Recursively check these paths...
10
    $rectorConfig->paths([
11
        __DIR__ . '/src',
12
    ]);
13

    
14
    // 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
    	__DIR__ . '/src/etc/inc/priv.defs.inc',
24
    ]);
25

    
26
    /*
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

    
39
	$rectorConfig->ruleWithConfiguration(Rules\ArrayGetExprRector::class,
40
										 ['g' => 'g_get',
41
										  'config' => 'config_get_path']);
42

    
43
};
(11-11/13)