Passed
Pull Request — master (#79)
by
unknown
04:42
created

rector.php (7 issues)

1
<?php
2
3
declare(strict_types=1);
4
5
use Rector\CodingStyle\Rector\ClassConst\VarConstantCommentRector;
6
use Rector\CodingStyle\Rector\Encapsed\EncapsedStringsToSprintfRector;
7
use Rector\Core\Configuration\Option;
8
use Rector\DeadCode\Rector\Class_\RemoveEmptyAbstractClassRector;
0 ignored issues
show
The type Rector\DeadCode\Rector\C...mptyAbstractClassRector was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
9
use Rector\EarlyReturn\Rector\If_\ChangeAndIfToEarlyReturnRector;
10
use Rector\EarlyReturn\Rector\If_\ChangeOrIfReturnToEarlyReturnRector;
11
use Rector\Naming\Rector\Assign\RenameVariableToMatchMethodCallReturnTypeRector;
12
use Rector\Naming\Rector\ClassMethod\RenameParamToMatchTypeRector;
13
use Rector\PHPUnit\Rector\Class_\AddSeeTestAnnotationRector;
14
use Rector\Privatization\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector;
15
use Rector\Privatization\Rector\Class_\FinalizeClassesWithoutChildrenRector;
16
use Rector\Privatization\Rector\Class_\RepeatedLiteralToClassConstantRector;
17
use Rector\Privatization\Rector\ClassMethod\MakeOnlyUsedByChildrenProtectedRector;
0 ignored issues
show
The type Rector\Privatization\Rec...ChildrenProtectedRector was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
18
use Rector\Privatization\Rector\ClassMethod\PrivatizeLocalOnlyMethodRector;
0 ignored issues
show
The type Rector\Privatization\Rec...zeLocalOnlyMethodRector was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
19
use Rector\Privatization\Rector\MethodCall\PrivatizeLocalGetterToPropertyRector;
20
use Rector\Privatization\Rector\Property\PrivatizeLocalPropertyToPrivatePropertyRector;
21
use Rector\Set\ValueObject\SetList;
22
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
23
24
return static function (ContainerConfigurator $containerConfigurator): void {
25
    $parameters = $containerConfigurator->parameters();
26
    $parameters->set(
27
        Option::SETS,
28
        [
29
            SetList::ARRAY_STR_FUNCTIONS_TO_STATIC_CALL,
0 ignored issues
show
Deprecated Code introduced by
The constant Rector\Set\ValueObject\S...UNCTIONS_TO_STATIC_CALL has been deprecated: Use LaravelSetList from rector/rector-laravel instead ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

29
            /** @scrutinizer ignore-deprecated */ SetList::ARRAY_STR_FUNCTIONS_TO_STATIC_CALL,

This class constant has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the constant will be removed from the class and what other constant to use instead.

Loading history...
30
            SetList::DOCTRINE_CODE_QUALITY,
0 ignored issues
show
The constant Rector\Set\ValueObject\S...::DOCTRINE_CODE_QUALITY has been deprecated. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

30
            /** @scrutinizer ignore-deprecated */ SetList::DOCTRINE_CODE_QUALITY,
Loading history...
31
            SetList::CODING_STYLE,
32
            SetList::CODE_QUALITY,
33
            SetList::CODE_QUALITY_STRICT,
34
            SetList::DEAD_CODE,
35
            SetList::PRIVATIZATION,
36
            SetList::NAMING,
37
            SetList::PHPUNIT_CODE_QUALITY,
0 ignored issues
show
The constant Rector\Set\ValueObject\S...t::PHPUNIT_CODE_QUALITY has been deprecated. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

37
            /** @scrutinizer ignore-deprecated */ SetList::PHPUNIT_CODE_QUALITY,
Loading history...
38
            SetList::SYMFONY_AUTOWIRE,
0 ignored issues
show
The constant Rector\Set\ValueObject\SetList::SYMFONY_AUTOWIRE was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
39
            SetList::PHP_70,
40
            SetList::PHP_71,
41
            SetList::PHP_72,
42
            SetList::EARLY_RETURN,
43
        ]
44
    );
45
    $parameters->set(
46
        Option::SKIP,
47
        [
48
            FinalizeClassesWithoutChildrenRector::class,
49
            ChangeReadOnlyVariableWithDefaultValueToConstantRector::class,
50
            AddSeeTestAnnotationRector::class,
51
            RepeatedLiteralToClassConstantRector::class,
52
            PrivatizeLocalOnlyMethodRector::class,
53
            RenameParamToMatchTypeRector::class,
54
            RenameVariableToMatchMethodCallReturnTypeRector::class,
55
            EncapsedStringsToSprintfRector::class,
56
            PrivatizeLocalPropertyToPrivatePropertyRector::class,
57
            ChangeOrIfReturnToEarlyReturnRector::class,
58
            PrivatizeLocalGetterToPropertyRector::class,
59
            ChangeAndIfToEarlyReturnRector::class,
60
            VarConstantCommentRector::class,
61
            MakeOnlyUsedByChildrenProtectedRector::class,
62
            RemoveEmptyAbstractClassRector::class,
63
        ]
64
    );
65
    $parameters->set(
66
        Option::PATHS,
67
        [
68
            __DIR__ . '/config',
69
            __DIR__ . '/src',
70
            __DIR__ . '/tests',
71
            __DIR__ . '/changelog-linker.php',
72
            __DIR__ . '/ecs.php',
73
            __DIR__ . '/rector.php',
74
        ]
75
    );
76
};
77