Skip to content

Commit 179897a

Browse files
authored
Merge pull request #148 from Chris53897/feature/rector
2 parents 8d53cbe + a6e3107 commit 179897a

File tree

2 files changed

+2
-25
lines changed

2 files changed

+2
-25
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
},
2626
"require-dev": {
2727
"phpunit/phpunit": "^7.5 | ^8.0 | ^9.0",
28-
"rector/rector": "^0.13.6",
28+
"rector/rector": "^1.0.4",
2929
"symplify/easy-coding-standard": "^11.0",
3030
"vimeo/psalm": "^4.24"
3131
},

rector.php

+1-24
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,10 @@
33
declare(strict_types=1);
44

55
use Rector\Config\RectorConfig;
6-
use Rector\Nette\Set\NetteSetList;
7-
use Rector\Set\ValueObject\SetList;
8-
use Rector\Core\Configuration\Option;
96
use Rector\Symfony\Set\SymfonySetList;
107
use Rector\Doctrine\Set\DoctrineSetList;
118
use Rector\Set\ValueObject\LevelSetList;
12-
use Rector\Symfony\Set\SensiolabsSetList;
13-
use Rector\CodingStyle\Rector\ClassConst\VarConstantCommentRector;
149
use Rector\DeadCode\Rector\ClassMethod\RemoveUselessParamTagRector;
15-
use Rector\TypeDeclaration\Rector\ClassMethod\AddArrayParamDocTypeRector;
16-
use Rector\TypeDeclaration\Rector\Property\PropertyTypeDeclarationRector;
17-
use Rector\TypeDeclaration\Rector\FunctionLike\ParamTypeDeclarationRector;
1810
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector;
1911
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromReturnNewRector;
2012
use Rector\TypeDeclaration\Rector\ClassMethod\AddReturnTypeDeclarationRector;
@@ -24,27 +16,18 @@
2416
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictNewArrayRector;
2517
use Rector\TypeDeclaration\Rector\ClassMethod\AddVoidReturnTypeWhereNoReturnRector;
2618
use Rector\TypeDeclaration\Rector\ClassMethod\AddMethodCallBasedStrictParamTypeRector;
27-
use Rector\TypeDeclaration\Rector\ClassMethod\ArrayShapeFromConstantArrayReturnRector;
2819
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictBoolReturnExprRector;
29-
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictNativeFuncCallRector;
30-
3120

3221
return static function (RectorConfig $rectorConfig): void {
3322
$rectorConfig->paths([
3423
__DIR__ . '/lib'
3524
]);
3625

37-
$parameters = $rectorConfig->parameters();
38-
$parameters->set(
39-
Option::SYMFONY_CONTAINER_XML_PATH_PARAMETER,
40-
__DIR__ . '/var/cache/dev/App_KernelDevDebugContainer.xml'
41-
);
26+
$rectorConfig->symfonyContainerXml(__DIR__ . '/var/cache/dev/App_KernelDevDebugContainer.xml');
4227

4328
$rectorConfig->sets([
4429
DoctrineSetList::ANNOTATIONS_TO_ATTRIBUTES,
4530
SymfonySetList::ANNOTATIONS_TO_ATTRIBUTES,
46-
NetteSetList::ANNOTATIONS_TO_ATTRIBUTES,
47-
SensiolabsSetList::FRAMEWORK_EXTRA_61,
4831
SymfonySetList::SYMFONY_60,
4932
LevelSetList::UP_TO_PHP_81
5033
]);
@@ -53,21 +36,15 @@
5336
$rectorConfig->rule(InlineConstructorDefaultToPropertyRector::class);
5437
$rectorConfig->rule(AddReturnTypeDeclarationRector::class);
5538
$rectorConfig->rules([
56-
AddArrayParamDocTypeRector::class,
5739
AddMethodCallBasedStrictParamTypeRector::class,
5840
AddVoidReturnTypeWhereNoReturnRector::class,
59-
ArrayShapeFromConstantArrayReturnRector::class,
6041
ParamTypeByMethodCallTypeRector::class,
6142
ParamTypeByParentCallTypeRector::class,
62-
ParamTypeDeclarationRector::class,
63-
PropertyTypeDeclarationRector::class,
6443
RemoveUselessParamTagRector::class,
6544
ReturnTypeFromReturnNewRector::class,
6645
ReturnTypeFromStrictBoolReturnExprRector::class,
67-
ReturnTypeFromStrictNativeFuncCallRector::class,
6846
ReturnTypeFromStrictNewArrayRector::class,
6947
TypedPropertyFromAssignsRector::class,
70-
VarConstantCommentRector::class
7148
]);
7249

7350
// define sets of rules

0 commit comments

Comments
 (0)