Welcome to mirror list, hosted at ThFree Co, Russian Federation.

rector.php - github.com/HuasoFoundries/phpPgAdmin6.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b8f25bcbd0bdb5d3c27db668d002f73f8a9ccfe2 (plain)
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
45
46
47
48
<?php

declare(strict_types=1);

use Rector\Core\Configuration\Option;
use Rector\Php70\Rector\StaticCall\StaticCallOnNonStaticToInstanceCallRector;
use Rector\Set\ValueObject\SetList;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;

return static function (ContainerConfigurator $containerConfigurator): void {
    $parameters = $containerConfigurator->parameters();

    $parameters->set(Option::AUTO_IMPORT_NAMES, true);

    $parameters->set(Option::SETS, [
        SetList::ACTION_INJECTION_TO_CONSTRUCTOR_INJECTION,
        SetList::ARRAY_STR_FUNCTIONS_TO_STATIC_CALL,
        SetList::CODE_QUALITY,
        SetList::PHP_53,
        SetList::PHP_54,
        SetList::PHP_56,
        SetList::PHP_70,
        SetList::PHP_71,
        SetList::PHP_72,
        SetList::PHPSTAN,
        SetList::PHPUNIT_CODE_QUALITY,
        SetList::SOLID,
    ]);
    $parameters->set(Option::SKIP, [
        Rector\SOLID\Rector\Property\AddFalseDefaultToBoolPropertyRector::class  => [
            // single file
            __DIR__ . '/src/classes/Connection.php',
            // or directory
            __DIR__ . '/src/database/databasetraits/HasTrait.php'
            
        ] 
    ]);
    $parameters->set(Option::PHP_VERSION_FEATURES, '7.2');
    $parameters->set(Option::ENABLE_CACHE, true);
    $parameters->set(Option::CACHE_DIR, __DIR__ . '/.build/rector');
    $parameters->set(Option::PATHS, [
        __DIR__ . '/src',
         //__DIR__ . '/tests'
         ]);
    $parameters->set(Option::EXCLUDE_RECTORS, [
       StaticCallOnNonStaticToInstanceCallRector::class,
    ]);
};