diff --git a/.github/workflows/code_analysis.yaml b/.github/workflows/code_analysis.yaml
deleted file mode 100644
index 6364d05b..00000000
--- a/.github/workflows/code_analysis.yaml
+++ /dev/null
@@ -1,18 +0,0 @@
-name: Code Analysis
-
-on:
- pull_request: null
- push:
- branches:
- - main
-
-jobs:
- code_analysis:
- uses: rectorphp/reusable-workflows/.github/workflows/code_analysis.yaml@main
-
- rector:
- # run only on PR's from branches on main repository (from core contributors), not on the forks or PR's from forks.
- if: github.event.pull_request.head.repo.full_name == github.repository && github.repository == 'driftingly/rector-laravel'
-
- # see https://github.com/rectorphp/reusable-workflows
- uses: rectorphp/reusable-workflows/.github/workflows/rector.yaml@main
diff --git a/.github/workflows/downgraded_release.yaml b/.github/workflows/downgraded_release.yaml
deleted file mode 100644
index f8d39d7f..00000000
--- a/.github/workflows/downgraded_release.yaml
+++ /dev/null
@@ -1,52 +0,0 @@
-name: Downgraded Release
-
-# https://tomasvotruba.com/blog/how-to-release-php-81-and-72-package-in-the-same-repository/
-# https://github.com/TomasVotruba/cognitive-complexity/blob/main/.github/workflows/downgraded_release.yaml
-# https://github.com/symplify/config-transformer/blob/main/.github/workflows/downgraded_release.yaml
-
-on:
- push:
- tags:
- - '*'
-
-jobs:
- downgrade_release:
- runs-on: ubuntu-latest
-
- steps:
- -
- uses: "actions/checkout@v3"
-
- -
- uses: "shivammathur/setup-php@v2"
- with:
- php-version: 8.1
- coverage: none
-
- - uses: "ramsey/composer-install@v2"
-
- # downgrade /src to PHP 7.2
- - run: vendor/bin/rector process src config --config build/rector-downgrade-php-72.php --ansi
- - run: vendor/bin/ecs check src config --fix --ansi
-
- # copy PHP 7.2 composer
- - run: cp build/composer-php-72.json composer.json
-
- # clear the dev files
- - run: rm -rf build .github tests stubs easy-ci.php ecs.php phpstan.neon phpunit.xml
-
- # setup git user
- -
- run: |
- git config user.email "action@github.com"
- git config user.name "GitHub Action"
-
- # publish to the same repository with a new tag
- -
- name: "Tag Downgraded Code"
- run: |
- git commit -a -m "release PHP 7.2 downgraded ${GITHUB_REF#refs/tags/}"
-
- # force push tag, so there is only 1 version
- git tag "${GITHUB_REF#refs/tags/}" --force
- git push origin "${GITHUB_REF#refs/tags/}" --force
diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml
deleted file mode 100644
index 87f57695..00000000
--- a/.github/workflows/tests.yaml
+++ /dev/null
@@ -1,28 +0,0 @@
-name: Tests
-
-on:
- pull_request: null
- push:
- branches:
- - main
-
-env:
- # see https://github.com/composer/composer/issues/9368#issuecomment-718112361
- COMPOSER_ROOT_VERSION: "dev-main"
-
-jobs:
- tests:
- runs-on: ubuntu-latest
-
- name: PHP ${{ matrix.php }} tests
- steps:
- - uses: actions/checkout@v3
-
- - uses: shivammathur/setup-php@v2
- with:
- php-version: 8.1
- coverage: none
-
- - uses: ramsey/composer-install@v2
-
- - run: vendor/bin/phpunit tests
diff --git a/build/composer-php-72.json b/build/composer-php-72.json
deleted file mode 100644
index 49079bdc..00000000
--- a/build/composer-php-72.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "name": "driftingly/rector-laravel",
- "type": "rector-extension",
- "license": "MIT",
- "description": "Rector upgrades rules for Laravel Framework",
- "require": {
- "php": "^7.2 || ^8.0"
- },
- "autoload": {
- "psr-4": {
- "RectorLaravel\\": "src"
- }
- },
- "autoload-dev": {
- "classmap": ["stubs"]
- },
- "minimum-stability": "dev",
- "prefer-stable": true
-}
diff --git a/build/rector-downgrade-php-72.php b/build/rector-downgrade-php-72.php
deleted file mode 100644
index 5550cffe..00000000
--- a/build/rector-downgrade-php-72.php
+++ /dev/null
@@ -1,10 +0,0 @@
-sets([DowngradeLevelSetList::DOWN_TO_PHP_72]);
-};
diff --git a/composer.json b/composer.json
index b2e0e43d..49079bdc 100644
--- a/composer.json
+++ b/composer.json
@@ -4,22 +4,7 @@
"license": "MIT",
"description": "Rector upgrades rules for Laravel Framework",
"require": {
- "php": ">=8.1",
- "rector/rector": "^0.18.0"
- },
- "require-dev": {
- "phpunit/phpunit": "^10.0",
- "phpstan/phpstan": "^1.8.2",
- "symplify/phpstan-rules": "^11.0",
- "symplify/phpstan-extensions": "^11.0",
- "symplify/easy-coding-standard": "^11.0",
- "symplify/rule-doc-generator": "^11.0",
- "rector/phpstan-rules": "^0.6",
- "phpstan/extension-installer": "^1.1",
- "phpstan/phpstan-webmozart-assert": "^1.1",
- "phpstan/phpstan-strict-rules": "^1.2",
- "symplify/vendor-patches": "^11.0",
- "rector/rector-debugging": "dev-main"
+ "php": "^7.2 || ^8.0"
},
"autoload": {
"psr-4": {
@@ -27,26 +12,8 @@
}
},
"autoload-dev": {
- "psr-4": {
- "RectorLaravel\\Tests\\": "tests"
- },
"classmap": ["stubs"]
},
- "scripts": {
- "phpstan": "vendor/bin/phpstan analyse --ansi --error-format symplify",
- "check-cs": "vendor/bin/ecs check --ansi",
- "fix-cs": "vendor/bin/ecs check --fix --ansi",
- "docs": [
- "vendor/bin/rule-doc-generator generate src --output-file docs/rector_rules_overview.md --ansi"
- ]
- },
"minimum-stability": "dev",
- "prefer-stable": true,
- "config": {
- "allow-plugins": {
- "cweagans/composer-patches": true,
- "rector/extension-installer": true,
- "phpstan/extension-installer": true
- }
- }
+ "prefer-stable": true
}
diff --git a/config/sets/laravel-array-str-functions-to-static-call.php b/config/sets/laravel-array-str-functions-to-static-call.php
index a1fbb3a1..19a8af4c 100644
--- a/config/sets/laravel-array-str-functions-to-static-call.php
+++ b/config/sets/laravel-array-str-functions-to-static-call.php
@@ -63,7 +63,9 @@
new FuncCallToStaticCall('studly_case', 'Illuminate\Support\Str', 'studly'),
new FuncCallToStaticCall('title_case', 'Illuminate\Support\Str', 'title'),
],
- fn ($function) => ! in_array($function->getOldFuncName(), $internalFunctions, true)
+ function ($function) use ($internalFunctions) {
+ return ! in_array($function->getOldFuncName(), $internalFunctions, true);
+ }
)
);
};
diff --git a/config/sets/laravel90.php b/config/sets/laravel90.php
index a90e3bfb..fbedc923 100644
--- a/config/sets/laravel90.php
+++ b/config/sets/laravel90.php
@@ -41,23 +41,19 @@
// https://github.com/laravel/framework/commit/e095ac0e928b5620f33c9b60816fde5ece867d32
$rectorConfig
- ->ruleWithConfiguration(ArgumentAdderRector::class, [new ArgumentAdder(
- 'Illuminate\Database\Eloquent\Model',
- 'touch',
- 0,
- 'attribute',
- ),
- ]);
+ ->ruleWithConfiguration(
+ ArgumentAdderRector::class,
+ [new ArgumentAdder('Illuminate\Database\Eloquent\Model', 'touch', 0, 'attribute'),
+ ]
+ );
// https://github.com/laravel/framework/commit/6daecf43dd931dc503e410645ff4a7d611e3371f
$rectorConfig
- ->ruleWithConfiguration(ArgumentAdderRector::class, [new ArgumentAdder(
- 'Illuminate\Queue\Failed\FailedJobProviderInterface',
- 'flush',
- 0,
- 'hours',
- ),
- ]);
+ ->ruleWithConfiguration(
+ ArgumentAdderRector::class,
+ [new ArgumentAdder('Illuminate\Queue\Failed\FailedJobProviderInterface', 'flush', 0, 'hours'),
+ ]
+ );
// https://github.com/laravel/framework/commit/84c78b9f5f3dad58f92161069e6482f7267ffdb6
$rectorConfig
diff --git a/easy-ci.php b/easy-ci.php
deleted file mode 100644
index 0e16f5ac..00000000
--- a/easy-ci.php
+++ /dev/null
@@ -1,13 +0,0 @@
-paths([__DIR__ . '/config', __DIR__ . '/src']);
-
- $easyCIConfig->typesToSkip([
- \Rector\Core\Contract\Rector\RectorInterface::class,
- ]);
-};
diff --git a/ecs.php b/ecs.php
deleted file mode 100644
index 32d444f2..00000000
--- a/ecs.php
+++ /dev/null
@@ -1,19 +0,0 @@
-sets([SetList::PSR_12, SetList::SYMPLIFY, SetList::COMMON, SetList::CLEAN_CODE]);
-
- $ecsConfig->paths([__DIR__ . '/src', __DIR__ . '/tests', __DIR__ . '/config', __DIR__ . '/ecs.php']);
-
- $ecsConfig->skip([
- '*/Source/*', '*/Fixture/*',
- // breaks annotated code - removed on symplify dev-main
- ReturnAssignmentFixer::class,
- ]);
-};
diff --git a/phpstan.neon b/phpstan.neon
deleted file mode 100644
index 852038fb..00000000
--- a/phpstan.neon
+++ /dev/null
@@ -1,29 +0,0 @@
-parameters:
- level: max
-
- paths:
- - config
- - src
- - tests
-
- scanDirectories:
- - stubs
-
- excludePaths:
- - */Source/*
- - *Source/*
-
-# reportUnmatchedIgnoredErrors: false
-
- ignoreErrors:
- # false positive
- - '#Parameter \#1 \$value of static method PhpParser\\BuilderHelpers\:\:normalizeValue\(\) expects array\|bool\|float\|int\|PhpParser\\Node\\Expr\|string\|null, mixed given#'
-
- -
- path: src/Rector/Class_/UnifyModelDatesWithCastsRector.php
- message: '#Parameter \#1 \$array of function array_keys expects array, mixed given#'
-
- # rector co-variant
- - '#Parameter \#1 \$node (.*?) of method RectorLaravel\\(.*?)\:\:(refactor|refactorWithScope)\(\) should be contravariant with parameter \$node \(PhpParser\\Node\) of method Rector\\Core\\Contract\\Rector\\RectorInterface\:\:refactor\(\)#'
-
- - '#Parameter \#1 \$className of method Rector\\Core\\Reflection\\ReflectionResolver\:\:resolveMethodReflection\(\) expects class\-string, string given#'
diff --git a/phpunit.xml b/phpunit.xml
deleted file mode 100644
index ffc6b237..00000000
--- a/phpunit.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
- tests
-
-
-
diff --git a/src/NodeAnalyzer/LumenRouteRegisteringMethodAnalyzer.php b/src/NodeAnalyzer/LumenRouteRegisteringMethodAnalyzer.php
index 4f21496e..8a1a9a3d 100644
--- a/src/NodeAnalyzer/LumenRouteRegisteringMethodAnalyzer.php
+++ b/src/NodeAnalyzer/LumenRouteRegisteringMethodAnalyzer.php
@@ -4,19 +4,29 @@
namespace RectorLaravel\NodeAnalyzer;
-use PhpParser\Node\Expr;
use PhpParser\Node\Expr\MethodCall;
-use PhpParser\Node\Identifier;
use PHPStan\Type\ObjectType;
use Rector\NodeNameResolver\NodeNameResolver;
use Rector\NodeTypeResolver\NodeTypeResolver;
final class LumenRouteRegisteringMethodAnalyzer
{
- public function __construct(
- private readonly NodeTypeResolver $nodeTypeResolver,
- private readonly NodeNameResolver $nodeNameResolver
- ) {
+ /**
+ * @readonly
+ * @var \Rector\NodeTypeResolver\NodeTypeResolver
+ */
+ private $nodeTypeResolver;
+
+ /**
+ * @readonly
+ * @var \Rector\NodeNameResolver\NodeNameResolver
+ */
+ private $nodeNameResolver;
+
+ public function __construct(NodeTypeResolver $nodeTypeResolver, NodeNameResolver $nodeNameResolver)
+ {
+ $this->nodeTypeResolver = $nodeTypeResolver;
+ $this->nodeNameResolver = $nodeNameResolver;
}
public function isLumenRoutingClass(MethodCall $methodCall): bool
@@ -24,12 +34,18 @@ public function isLumenRoutingClass(MethodCall $methodCall): bool
return $this->nodeTypeResolver->isObjectType($methodCall->var, new ObjectType('Laravel\Lumen\Routing\Router'));
}
- public function isRoutesRegisterGroup(Identifier|Expr $name): bool
+ /**
+ * @param \PhpParser\Node\Identifier|\PhpParser\Node\Expr $name
+ */
+ public function isRoutesRegisterGroup($name): bool
{
return $this->nodeNameResolver->isName($name, 'group');
}
- public function isRoutesRegisterRoute(Identifier|Expr $name): bool
+ /**
+ * @param \PhpParser\Node\Identifier|\PhpParser\Node\Expr $name
+ */
+ public function isRoutesRegisterRoute($name): bool
{
return $this->nodeNameResolver->isNames($name, ['delete', 'get', 'options', 'patch', 'post', 'put']);
}
diff --git a/src/NodeAnalyzer/StaticCallAnalyzer.php b/src/NodeAnalyzer/StaticCallAnalyzer.php
index 1dd569c2..a4e23437 100644
--- a/src/NodeAnalyzer/StaticCallAnalyzer.php
+++ b/src/NodeAnalyzer/StaticCallAnalyzer.php
@@ -11,9 +11,15 @@
final class StaticCallAnalyzer
{
- public function __construct(
- private readonly NodeNameResolver $nodeNameResolver
- ) {
+ /**
+ * @readonly
+ * @var \Rector\NodeNameResolver\NodeNameResolver
+ */
+ private $nodeNameResolver;
+
+ public function __construct(NodeNameResolver $nodeNameResolver)
+ {
+ $this->nodeNameResolver = $nodeNameResolver;
}
public function isParentCallNamed(Node $node, string $desiredMethodName): bool
diff --git a/src/NodeFactory/AppAssignFactory.php b/src/NodeFactory/AppAssignFactory.php
index 726e2467..833c3b33 100644
--- a/src/NodeFactory/AppAssignFactory.php
+++ b/src/NodeFactory/AppAssignFactory.php
@@ -15,9 +15,15 @@
final class AppAssignFactory
{
- public function __construct(
- private readonly PhpDocInfoFactory $phpDocInfoFactory
- ) {
+ /**
+ * @readonly
+ * @var \Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory
+ */
+ private $phpDocInfoFactory;
+
+ public function __construct(PhpDocInfoFactory $phpDocInfoFactory)
+ {
+ $this->phpDocInfoFactory = $phpDocInfoFactory;
}
public function createAssignExpression(
diff --git a/src/NodeFactory/ModelFactoryNodeFactory.php b/src/NodeFactory/ModelFactoryNodeFactory.php
index 4b10c243..eec37fba 100644
--- a/src/NodeFactory/ModelFactoryNodeFactory.php
+++ b/src/NodeFactory/ModelFactoryNodeFactory.php
@@ -32,12 +32,40 @@ final class ModelFactoryNodeFactory
*/
private const THIS = 'this';
+ /**
+ * @readonly
+ * @var \Rector\NodeNameResolver\NodeNameResolver
+ */
+ private $nodeNameResolver;
+
+ /**
+ * @readonly
+ * @var \Rector\Core\PhpParser\Node\NodeFactory
+ */
+ private $nodeFactory;
+
+ /**
+ * @readonly
+ * @var \Rector\Core\PhpParser\Node\Value\ValueResolver
+ */
+ private $valueResolver;
+
+ /**
+ * @readonly
+ * @var \Rector\PhpDocParser\NodeTraverser\SimpleCallableNodeTraverser
+ */
+ private $simpleCallableNodeTraverser;
+
public function __construct(
- private readonly NodeNameResolver $nodeNameResolver,
- private readonly NodeFactory $nodeFactory,
- private readonly ValueResolver $valueResolver,
- private readonly SimpleCallableNodeTraverser $simpleCallableNodeTraverser
+ NodeNameResolver $nodeNameResolver,
+ NodeFactory $nodeFactory,
+ ValueResolver $valueResolver,
+ SimpleCallableNodeTraverser $simpleCallableNodeTraverser
) {
+ $this->nodeNameResolver = $nodeNameResolver;
+ $this->nodeFactory = $nodeFactory;
+ $this->valueResolver = $valueResolver;
+ $this->simpleCallableNodeTraverser = $simpleCallableNodeTraverser;
}
public function createEmptyFactory(string $name, Expr $expr): Class_
diff --git a/src/NodeFactory/RouterRegisterNodeAnalyzer.php b/src/NodeFactory/RouterRegisterNodeAnalyzer.php
index 35e82b13..ddf0c7b2 100644
--- a/src/NodeFactory/RouterRegisterNodeAnalyzer.php
+++ b/src/NodeFactory/RouterRegisterNodeAnalyzer.php
@@ -4,23 +4,36 @@
namespace RectorLaravel\NodeFactory;
-use PhpParser\Node\Expr;
use PhpParser\Node\Expr\MethodCall;
use PhpParser\Node\Expr\StaticCall;
-use PhpParser\Node\Identifier;
use PHPStan\Type\ObjectType;
use Rector\NodeNameResolver\NodeNameResolver;
use Rector\NodeTypeResolver\NodeTypeResolver;
final class RouterRegisterNodeAnalyzer
{
- public function __construct(
- private readonly NodeNameResolver $nodeNameResolver,
- private readonly NodeTypeResolver $nodeTypeResolver
- ) {
+ /**
+ * @readonly
+ * @var \Rector\NodeNameResolver\NodeNameResolver
+ */
+ private $nodeNameResolver;
+
+ /**
+ * @readonly
+ * @var \Rector\NodeTypeResolver\NodeTypeResolver
+ */
+ private $nodeTypeResolver;
+
+ public function __construct(NodeNameResolver $nodeNameResolver, NodeTypeResolver $nodeTypeResolver)
+ {
+ $this->nodeNameResolver = $nodeNameResolver;
+ $this->nodeTypeResolver = $nodeTypeResolver;
}
- public function isRegisterMethodStaticCall(MethodCall|StaticCall $node): bool
+ /**
+ * @param \PhpParser\Node\Expr\MethodCall|\PhpParser\Node\Expr\StaticCall $node
+ */
+ public function isRegisterMethodStaticCall($node): bool
{
if (! $this->isRegisterName($node->name)) {
return false;
@@ -39,7 +52,10 @@ public function isRegisterMethodStaticCall(MethodCall|StaticCall $node): bool
);
}
- public function isRegisterName(Identifier|Expr $name): bool
+ /**
+ * @param \PhpParser\Node\Identifier|\PhpParser\Node\Expr $name
+ */
+ public function isRegisterName($name): bool
{
if ($this->isRegisterAnyVerb($name)) {
return true;
@@ -56,22 +72,34 @@ public function isRegisterName(Identifier|Expr $name): bool
return $this->isRegisterFallback($name);
}
- public function isRegisterMultipleVerbs(Identifier|Expr $name): bool
+ /**
+ * @param \PhpParser\Node\Identifier|\PhpParser\Node\Expr $name
+ */
+ public function isRegisterMultipleVerbs($name): bool
{
return $this->nodeNameResolver->isName($name, 'match');
}
- public function isRegisterAllVerbs(Identifier|Expr $name): bool
+ /**
+ * @param \PhpParser\Node\Identifier|\PhpParser\Node\Expr $name
+ */
+ public function isRegisterAllVerbs($name): bool
{
return $this->nodeNameResolver->isName($name, 'any');
}
- public function isRegisterAnyVerb(Identifier|Expr $name): bool
+ /**
+ * @param \PhpParser\Node\Identifier|\PhpParser\Node\Expr $name
+ */
+ public function isRegisterAnyVerb($name): bool
{
return $this->nodeNameResolver->isNames($name, ['delete', 'get', 'options', 'patch', 'post', 'put']);
}
- public function isRegisterFallback(Identifier|Expr $name): bool
+ /**
+ * @param \PhpParser\Node\Identifier|\PhpParser\Node\Expr $name
+ */
+ public function isRegisterFallback($name): bool
{
return $this->nodeNameResolver->isName($name, 'fallback');
}
diff --git a/src/Rector/Assign/CallOnAppArrayAccessToStandaloneAssignRector.php b/src/Rector/Assign/CallOnAppArrayAccessToStandaloneAssignRector.php
index 1bd7412d..e9306ac1 100644
--- a/src/Rector/Assign/CallOnAppArrayAccessToStandaloneAssignRector.php
+++ b/src/Rector/Assign/CallOnAppArrayAccessToStandaloneAssignRector.php
@@ -25,15 +25,27 @@
*/
final class CallOnAppArrayAccessToStandaloneAssignRector extends AbstractRector
{
+ /**
+ * @readonly
+ * @var \RectorLaravel\NodeFactory\AppAssignFactory
+ */
+ private $appAssignFactory;
+
+ /**
+ * @readonly
+ * @var \Rector\Comments\NodeDocBlock\DocBlockUpdater
+ */
+ private $docBlockUpdater;
+
/**
* @var ServiceNameTypeAndVariableName[]
*/
- private array $serviceNameTypeAndVariableNames = [];
+ private $serviceNameTypeAndVariableNames = [];
- public function __construct(
- private readonly AppAssignFactory $appAssignFactory,
- private readonly DocBlockUpdater $docBlockUpdater,
- ) {
+ public function __construct(AppAssignFactory $appAssignFactory, DocBlockUpdater $docBlockUpdater)
+ {
+ $this->appAssignFactory = $appAssignFactory;
+ $this->docBlockUpdater = $docBlockUpdater;
$this->serviceNameTypeAndVariableNames[] = new ServiceNameTypeAndVariableName(
'validator',
'Illuminate\Validation\Factory',
@@ -51,8 +63,9 @@ public function getNodeTypes(): array
/**
* @param Expression $node
+ * @return \PhpParser\Node|mixed[]|int|null
*/
- public function refactor(Node $node): Node|array|int|null
+ public function refactor(Node $node)
{
if (! $node->expr instanceof Assign) {
return null;
diff --git a/src/Rector/ClassMethod/AddArgumentDefaultValueRector.php b/src/Rector/ClassMethod/AddArgumentDefaultValueRector.php
index b1012452..ead602ad 100644
--- a/src/Rector/ClassMethod/AddArgumentDefaultValueRector.php
+++ b/src/Rector/ClassMethod/AddArgumentDefaultValueRector.php
@@ -24,12 +24,12 @@ final class AddArgumentDefaultValueRector extends AbstractRector implements Conf
/**
* @var string
*/
- final public const ADDED_ARGUMENTS = 'added_arguments';
+ public const ADDED_ARGUMENTS = 'added_arguments';
/**
* @var AddArgumentDefaultValue[]
*/
- private array $addedArguments = [];
+ private $addedArguments = [];
public function getRuleDefinition(): RuleDefinition
{
diff --git a/src/Rector/ClassMethod/AddGenericReturnTypeToRelationsRector.php b/src/Rector/ClassMethod/AddGenericReturnTypeToRelationsRector.php
index 39e52024..ca3f71af 100644
--- a/src/Rector/ClassMethod/AddGenericReturnTypeToRelationsRector.php
+++ b/src/Rector/ClassMethod/AddGenericReturnTypeToRelationsRector.php
@@ -38,10 +38,22 @@ class AddGenericReturnTypeToRelationsRector extends AbstractScopeAwareRector
// Relation methods which need the class as TChildModel.
private const RELATION_WITH_CHILD_METHODS = ['belongsTo', 'morphTo'];
- public function __construct(
- private readonly TypeComparator $typeComparator,
- private readonly DocBlockUpdater $docBlockUpdater,
- ) {
+ /**
+ * @readonly
+ * @var \Rector\NodeTypeResolver\TypeComparator\TypeComparator
+ */
+ private $typeComparator;
+
+ /**
+ * @readonly
+ * @var \Rector\Comments\NodeDocBlock\DocBlockUpdater
+ */
+ private $docBlockUpdater;
+
+ public function __construct(TypeComparator $typeComparator, DocBlockUpdater $docBlockUpdater)
+ {
+ $this->typeComparator = $typeComparator;
+ $this->docBlockUpdater = $docBlockUpdater;
}
public function getRuleDefinition(): RuleDefinition
@@ -163,10 +175,12 @@ public function refactorWithScope(Node $node, Scope $scope): ?Node
return null;
}
- $genericTypeNode = new GenericTypeNode(
- new FullyQualifiedIdentifierTypeNode($methodReturnTypeName),
- $this->getGenericTypes($relatedClass, $classForChildGeneric),
- );
+ $genericTypeNode = new GenericTypeNode(new FullyQualifiedIdentifierTypeNode(
+ $methodReturnTypeName
+ ), $this->getGenericTypes(
+ $relatedClass,
+ $classForChildGeneric
+ ));
// Update or add return tag
if ($phpDocInfo->getReturnTagValue() instanceof ReturnTagValueNode) {
@@ -206,7 +220,9 @@ private function getRelationMethodCall(ClassMethod $classMethod): ?MethodCall
{
$node = $this->betterNodeFinder->findFirstInFunctionLikeScoped(
$classMethod,
- fn (Node $subNode): bool => $subNode instanceof Return_
+ function (Node $subNode): bool {
+ return $subNode instanceof Return_;
+ }
);
if (! $node instanceof Return_) {
@@ -243,7 +259,7 @@ private function getClassForChildGeneric(Scope $scope, MethodCall $methodCall):
$classReflection = $scope->getClassReflection();
- return $classReflection?->getName();
+ return ($nullsafeVariable1 = $classReflection) ? $nullsafeVariable1->getName() : null;
}
private function areNativeTypeAndPhpDocReturnTypeEqual(
@@ -263,10 +279,7 @@ private function areNativeTypeAndPhpDocReturnTypeEqual(
$methodReturnTypePHPStanType = $this->staticTypeMapper->mapPhpParserNodePHPStanType($node);
- return $this->typeComparator->areTypesEqual(
- $methodReturnTypePHPStanType,
- $phpDocPHPStanTypeWithoutGenerics,
- );
+ return $this->typeComparator->areTypesEqual($methodReturnTypePHPStanType, $phpDocPHPStanTypeWithoutGenerics);
}
private function areGenericTypesEqual(
diff --git a/src/Rector/ClassMethod/AddParentBootToModelClassMethodRector.php b/src/Rector/ClassMethod/AddParentBootToModelClassMethodRector.php
index f9bf3d4c..5273f2e6 100644
--- a/src/Rector/ClassMethod/AddParentBootToModelClassMethodRector.php
+++ b/src/Rector/ClassMethod/AddParentBootToModelClassMethodRector.php
@@ -26,10 +26,22 @@ final class AddParentBootToModelClassMethodRector extends AbstractRector
*/
private const BOOT = 'boot';
- public function __construct(
- private readonly StaticCallAnalyzer $staticCallAnalyzer,
- private readonly ReflectionResolver $reflectionResolver,
- ) {
+ /**
+ * @readonly
+ * @var \RectorLaravel\NodeAnalyzer\StaticCallAnalyzer
+ */
+ private $staticCallAnalyzer;
+
+ /**
+ * @readonly
+ * @var \Rector\Core\Reflection\ReflectionResolver
+ */
+ private $reflectionResolver;
+
+ public function __construct(StaticCallAnalyzer $staticCallAnalyzer, ReflectionResolver $reflectionResolver)
+ {
+ $this->staticCallAnalyzer = $staticCallAnalyzer;
+ $this->reflectionResolver = $reflectionResolver;
}
public function getRuleDefinition(): RuleDefinition
diff --git a/src/Rector/ClassMethod/AddParentRegisterToEventServiceProviderRector.php b/src/Rector/ClassMethod/AddParentRegisterToEventServiceProviderRector.php
index ebe42457..1fb509e1 100644
--- a/src/Rector/ClassMethod/AddParentRegisterToEventServiceProviderRector.php
+++ b/src/Rector/ClassMethod/AddParentRegisterToEventServiceProviderRector.php
@@ -26,10 +26,22 @@ final class AddParentRegisterToEventServiceProviderRector extends AbstractRector
*/
private const REGISTER = 'register';
- public function __construct(
- private readonly StaticCallAnalyzer $staticCallAnalyzer,
- private readonly ReflectionResolver $reflectionResolver,
- ) {
+ /**
+ * @readonly
+ * @var \RectorLaravel\NodeAnalyzer\StaticCallAnalyzer
+ */
+ private $staticCallAnalyzer;
+
+ /**
+ * @readonly
+ * @var \Rector\Core\Reflection\ReflectionResolver
+ */
+ private $reflectionResolver;
+
+ public function __construct(StaticCallAnalyzer $staticCallAnalyzer, ReflectionResolver $reflectionResolver)
+ {
+ $this->staticCallAnalyzer = $staticCallAnalyzer;
+ $this->reflectionResolver = $reflectionResolver;
}
public function getRuleDefinition(): RuleDefinition
diff --git a/src/Rector/ClassMethod/MigrateToSimplifiedAttributeRector.php b/src/Rector/ClassMethod/MigrateToSimplifiedAttributeRector.php
index d6643c8d..17622663 100644
--- a/src/Rector/ClassMethod/MigrateToSimplifiedAttributeRector.php
+++ b/src/Rector/ClassMethod/MigrateToSimplifiedAttributeRector.php
@@ -40,8 +40,9 @@ public function getNodeTypes(): array
/**
* @param Class_ $node
+ * @return \PhpParser\Node|mixed[]|int|null
*/
- public function refactor(Node $node): Node|array|int|null
+ public function refactor(Node $node)
{
if (! $this->isObjectType($node, new ObjectType('Illuminate\Database\Eloquent\Model'))) {
return null;
@@ -113,8 +114,9 @@ protected function firstName(): \Illuminate\Database\Eloquent\Casts\Attribute
/**
* @param ClassMethod[] $allClassMethods
+ * @return \PhpParser\Node\Stmt\ClassMethod|int|null
*/
- private function refactorClassMethod(ClassMethod $classMethod, array $allClassMethods): ClassMethod|int|null
+ private function refactorClassMethod(ClassMethod $classMethod, array $allClassMethods)
{
$nodeName = $classMethod->name->name;
@@ -263,12 +265,20 @@ private function createAttributeClassMethod(
private function isAccessor(string $nodeName): bool
{
- return str_starts_with($nodeName, 'get') && str_ends_with($nodeName, 'Attribute');
+ return strncmp($nodeName, 'get', strlen('get')) === 0 && substr_compare(
+ $nodeName,
+ 'Attribute',
+ -strlen('Attribute')
+ ) === 0;
}
private function isMutator(string $nodeName): bool
{
- return str_starts_with($nodeName, 'set') && str_ends_with($nodeName, 'Attribute');
+ return strncmp($nodeName, 'set', strlen('set')) === 0 && substr_compare(
+ $nodeName,
+ 'Attribute',
+ -strlen('Attribute')
+ ) === 0;
}
/**
diff --git a/src/Rector/Class_/AddExtendsAnnotationToModelFactoriesRector.php b/src/Rector/Class_/AddExtendsAnnotationToModelFactoriesRector.php
index d2c726ed..00f6699c 100644
--- a/src/Rector/Class_/AddExtendsAnnotationToModelFactoriesRector.php
+++ b/src/Rector/Class_/AddExtendsAnnotationToModelFactoriesRector.php
@@ -31,9 +31,15 @@ final class AddExtendsAnnotationToModelFactoriesRector extends AbstractRector
private const FACTORY_CLASS_NAME = 'Illuminate\Database\Eloquent\Factories\Factory';
- public function __construct(
- private readonly DocBlockUpdater $docBlockUpdater,
- ) {
+ /**
+ * @readonly
+ * @var \Rector\Comments\NodeDocBlock\DocBlockUpdater
+ */
+ private $docBlockUpdater;
+
+ public function __construct(DocBlockUpdater $docBlockUpdater)
+ {
+ $this->docBlockUpdater = $docBlockUpdater;
}
public function getRuleDefinition(): RuleDefinition
diff --git a/src/Rector/Class_/AddMockConsoleOutputFalseToConsoleTestsRector.php b/src/Rector/Class_/AddMockConsoleOutputFalseToConsoleTestsRector.php
index 66a01afc..3653e92f 100644
--- a/src/Rector/Class_/AddMockConsoleOutputFalseToConsoleTestsRector.php
+++ b/src/Rector/Class_/AddMockConsoleOutputFalseToConsoleTestsRector.php
@@ -31,11 +31,32 @@
*/
final class AddMockConsoleOutputFalseToConsoleTestsRector extends AbstractRector
{
+ /**
+ * @readonly
+ * @var \Rector\Core\NodeAnalyzer\PropertyFetchAnalyzer
+ */
+ private $propertyFetchAnalyzer;
+
+ /**
+ * @readonly
+ * @var \Rector\PHPUnit\NodeAnalyzer\SetUpMethodDecorator
+ */
+ private $setUpMethodDecorator;
+
+ /**
+ * @readonly
+ * @var \Rector\Privatization\NodeManipulator\VisibilityManipulator
+ */
+ private $visibilityManipulator;
+
public function __construct(
- private readonly PropertyFetchAnalyzer $propertyFetchAnalyzer,
- private readonly SetUpMethodDecorator $setUpMethodDecorator,
- private readonly VisibilityManipulator $visibilityManipulator
+ PropertyFetchAnalyzer $propertyFetchAnalyzer,
+ SetUpMethodDecorator $setUpMethodDecorator,
+ VisibilityManipulator $visibilityManipulator
) {
+ $this->propertyFetchAnalyzer = $propertyFetchAnalyzer;
+ $this->setUpMethodDecorator = $setUpMethodDecorator;
+ $this->visibilityManipulator = $visibilityManipulator;
}
public function getRuleDefinition(): RuleDefinition
diff --git a/src/Rector/Class_/AnonymousMigrationsRector.php b/src/Rector/Class_/AnonymousMigrationsRector.php
index 8ca6cd0a..3643e520 100644
--- a/src/Rector/Class_/AnonymousMigrationsRector.php
+++ b/src/Rector/Class_/AnonymousMigrationsRector.php
@@ -22,9 +22,15 @@
*/
final class AnonymousMigrationsRector extends AbstractRector
{
- public function __construct(
- private readonly ClassAnalyzer $classAnalyzer
- ) {
+ /**
+ * @readonly
+ * @var \Rector\Core\NodeAnalyzer\ClassAnalyzer
+ */
+ private $classAnalyzer;
+
+ public function __construct(ClassAnalyzer $classAnalyzer)
+ {
+ $this->classAnalyzer = $classAnalyzer;
}
public function getRuleDefinition(): RuleDefinition
diff --git a/src/Rector/Class_/UnifyModelDatesWithCastsRector.php b/src/Rector/Class_/UnifyModelDatesWithCastsRector.php
index d5c570dd..b072b8f5 100644
--- a/src/Rector/Class_/UnifyModelDatesWithCastsRector.php
+++ b/src/Rector/Class_/UnifyModelDatesWithCastsRector.php
@@ -24,9 +24,15 @@
*/
final class UnifyModelDatesWithCastsRector extends AbstractRector
{
- public function __construct(
- private readonly ClassInsertManipulator $classInsertManipulator
- ) {
+ /**
+ * @readonly
+ * @var \Rector\Core\NodeManipulator\ClassInsertManipulator
+ */
+ private $classInsertManipulator;
+
+ public function __construct(ClassInsertManipulator $classInsertManipulator)
+ {
+ $this->classInsertManipulator = $classInsertManipulator;
}
public function getRuleDefinition(): RuleDefinition
diff --git a/src/Rector/Expr/AppEnvironmentComparisonToParameterRector.php b/src/Rector/Expr/AppEnvironmentComparisonToParameterRector.php
index 40bf220f..f83f9717 100644
--- a/src/Rector/Expr/AppEnvironmentComparisonToParameterRector.php
+++ b/src/Rector/Expr/AppEnvironmentComparisonToParameterRector.php
@@ -45,7 +45,10 @@ public function getNodeTypes(): array
return [Expr::class];
}
- public function refactor(Node $node): MethodCall|StaticCall|null
+ /**
+ * @return \PhpParser\Node\Expr\MethodCall|\PhpParser\Node\Expr\StaticCall|null
+ */
+ public function refactor(Node $node)
{
if (! $node instanceof Identical && ! $node instanceof Equal) {
return null;
@@ -55,10 +58,12 @@ public function refactor(Node $node): MethodCall|StaticCall|null
$methodCall = array_values(
array_filter(
[$node->left, $node->right],
- fn ($node) => ($node instanceof MethodCall || $node instanceof StaticCall) && $this->isName(
- $node->name,
- 'environment'
- )
+ function ($node) {
+ return ($node instanceof MethodCall || $node instanceof StaticCall) && $this->isName(
+ $node->name,
+ 'environment'
+ );
+ }
)
)[0] ?? null;
@@ -68,7 +73,9 @@ public function refactor(Node $node): MethodCall|StaticCall|null
/** @var Expr $otherNode */
$otherNode = array_values(
- array_filter([$node->left, $node->right], static fn ($node) => $node !== $methodCall)
+ array_filter([$node->left, $node->right], static function ($node) use ($methodCall) {
+ return $node !== $methodCall;
+ })
)[0] ?? null;
if (! $otherNode instanceof String_) {
@@ -85,22 +92,29 @@ public function refactor(Node $node): MethodCall|StaticCall|null
return $methodCall;
}
- private function validMethodCall(MethodCall|StaticCall $methodCall): bool
+ /**
+ * @param \PhpParser\Node\Expr\MethodCall|\PhpParser\Node\Expr\StaticCall $methodCall
+ */
+ private function validMethodCall($methodCall): bool
{
- return match (true) {
- $methodCall instanceof MethodCall && $this->isObjectType(
+ switch (true) {
+ case $methodCall instanceof MethodCall && $this->isObjectType(
$methodCall->var,
new ObjectType('Illuminate\Contracts\Foundation\Application')
- ) => true,
- $methodCall instanceof StaticCall && $this->isObjectType(
+ ):
+ return true;
+ case $methodCall instanceof StaticCall && $this->isObjectType(
$methodCall->class,
new ObjectType('Illuminate\Support\Facades\App')
- ) => true,
- $methodCall instanceof StaticCall && $this->isObjectType(
+ ):
+ return true;
+ case $methodCall instanceof StaticCall && $this->isObjectType(
$methodCall->class,
new ObjectType('App')
- ) => true,
- default => false,
- };
+ ):
+ return true;
+ default:
+ return false;
+ }
}
}
diff --git a/src/Rector/Expr/SubStrToStartsWithOrEndsWithStaticMethodCallRector/SubStrToStartsWithOrEndsWithStaticMethodCallRector.php b/src/Rector/Expr/SubStrToStartsWithOrEndsWithStaticMethodCallRector/SubStrToStartsWithOrEndsWithStaticMethodCallRector.php
index 6f3255f6..9aefecfc 100644
--- a/src/Rector/Expr/SubStrToStartsWithOrEndsWithStaticMethodCallRector/SubStrToStartsWithOrEndsWithStaticMethodCallRector.php
+++ b/src/Rector/Expr/SubStrToStartsWithOrEndsWithStaticMethodCallRector/SubStrToStartsWithOrEndsWithStaticMethodCallRector.php
@@ -22,20 +22,16 @@ class SubStrToStartsWithOrEndsWithStaticMethodCallRector extends AbstractRector
public function getRuleDefinition(): RuleDefinition
{
return new RuleDefinition('Use Str::startsWith() or Str::endsWith() instead of substr() === $str', [
- new CodeSample(
- <<<'CODE_SAMPLE'
+ new CodeSample(<<<'CODE_SAMPLE'
if (substr($str, 0, 3) === 'foo') {
// do something
}
CODE_SAMPLE
- ,
- <<<'CODE_SAMPLE'
+, <<<'CODE_SAMPLE'
if (Str::startsWith($str, 'foo')) {
// do something
}
-CODE_SAMPLE
- ,
- ),
+CODE_SAMPLE),
]);
}
@@ -55,10 +51,9 @@ public function refactor(Node $node): ?StaticCall
/** @var Expr\FuncCall|null $functionCall */
$functionCall = array_values(
- array_filter([$node->left, $node->right], fn ($node) => $node instanceof FuncCall && $this->isName(
- $node,
- 'substr'
- ))
+ array_filter([$node->left, $node->right], function ($node) {
+ return $node instanceof FuncCall && $this->isName($node, 'substr');
+ })
)[0] ?? null;
if (! $functionCall instanceof FuncCall) {
@@ -67,7 +62,9 @@ public function refactor(Node $node): ?StaticCall
/** @var Expr $otherNode */
$otherNode = array_values(
- array_filter([$node->left, $node->right], static fn ($node) => $node !== $functionCall)
+ array_filter([$node->left, $node->right], static function ($node) use ($functionCall) {
+ return $node !== $functionCall;
+ })
)[0] ?? null;
// get the function call second argument value
diff --git a/src/Rector/FuncCall/ArgumentFuncCallToMethodCallRector.php b/src/Rector/FuncCall/ArgumentFuncCallToMethodCallRector.php
index 4cdd672a..b374df94 100644
--- a/src/Rector/FuncCall/ArgumentFuncCallToMethodCallRector.php
+++ b/src/Rector/FuncCall/ArgumentFuncCallToMethodCallRector.php
@@ -7,8 +7,6 @@
use PhpParser\Node;
use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Expr\MethodCall;
-use PhpParser\Node\Expr\PropertyFetch;
-use PhpParser\Node\Expr\Variable;
use PhpParser\Node\Stmt\Class_;
use PHPStan\Type\ObjectType;
use Rector\Core\Contract\Rector\ConfigurableRectorInterface;
@@ -28,15 +26,29 @@
*/
final class ArgumentFuncCallToMethodCallRector extends AbstractRector implements ConfigurableRectorInterface
{
+ /**
+ * @readonly
+ * @var \Rector\NodeTypeResolver\TypeAnalyzer\ArrayTypeAnalyzer
+ */
+ private $arrayTypeAnalyzer;
+
+ /**
+ * @readonly
+ * @var \Rector\Transform\NodeAnalyzer\FuncCallStaticCallToMethodCallAnalyzer
+ */
+ private $funcCallStaticCallToMethodCallAnalyzer;
+
/**
* @var ArgumentFuncCallToMethodCallInterface[]
*/
- private array $argumentFuncCallToMethodCalls = [];
+ private $argumentFuncCallToMethodCalls = [];
public function __construct(
- private readonly ArrayTypeAnalyzer $arrayTypeAnalyzer,
- private readonly FuncCallStaticCallToMethodCallAnalyzer $funcCallStaticCallToMethodCallAnalyzer
+ ArrayTypeAnalyzer $arrayTypeAnalyzer,
+ FuncCallStaticCallToMethodCallAnalyzer $funcCallStaticCallToMethodCallAnalyzer
) {
+ $this->arrayTypeAnalyzer = $arrayTypeAnalyzer;
+ $this->funcCallStaticCallToMethodCallAnalyzer = $funcCallStaticCallToMethodCallAnalyzer;
}
public function getRuleDefinition(): RuleDefinition
@@ -123,7 +135,7 @@ public function refactor(Node $node): ?Node
$expr = $this->funcCallStaticCallToMethodCallAnalyzer->matchTypeProvidingExpr(
$class,
$classMethod,
- new ObjectType($argumentFuncCallToMethodCall->getClass()),
+ new ObjectType($argumentFuncCallToMethodCall->getClass())
);
$hasChanged = true;
@@ -135,7 +147,7 @@ public function refactor(Node $node): ?Node
$expr = $this->funcCallStaticCallToMethodCallAnalyzer->matchTypeProvidingExpr(
$class,
$classMethod,
- new ObjectType($argumentFuncCallToMethodCall->getClass()),
+ new ObjectType($argumentFuncCallToMethodCall->getClass())
);
$hasChanged = true;
@@ -169,11 +181,15 @@ public function configure(array $configuration): void
$this->argumentFuncCallToMethodCalls = $configuration;
}
+ /**
+ * @param \PhpParser\Node\Expr\MethodCall|\PhpParser\Node\Expr\PropertyFetch|\PhpParser\Node\Expr\Variable $expr
+ * @return \PhpParser\Node\Expr\MethodCall|\PhpParser\Node\Expr\PropertyFetch|\PhpParser\Node\Expr\Variable
+ */
public function refactorFuncCallToMethodCall(
FuncCall $funcCall,
ArgumentFuncCallToMethodCall $argumentFuncCallToMethodCall,
- MethodCall|PropertyFetch|Variable $expr
- ): MethodCall|PropertyFetch|Variable {
+ $expr
+ ) {
if ($funcCall->args === []) {
return $this->refactorEmptyFuncCallArgs($argumentFuncCallToMethodCall, $expr);
}
@@ -187,10 +203,13 @@ public function refactorFuncCallToMethodCall(
return $this->nodeFactory->createMethodCall($expr, $methodIfArgs, $funcCall->args);
}
+ /**
+ * @param \PhpParser\Node\Expr\MethodCall|\PhpParser\Node\Expr\PropertyFetch|\PhpParser\Node\Expr\Variable $expr
+ */
private function refactorArrayFunctionToMethodCall(
FuncCall $funcCall,
ArrayFuncCallToMethodCall $arrayFuncCallToMethodCall,
- MethodCall|PropertyFetch|Variable $expr
+ $expr
): ?Node {
if ($funcCall->getArgs() === []) {
return $expr;
@@ -207,10 +226,12 @@ private function refactorArrayFunctionToMethodCall(
return new MethodCall($expr, $arrayFuncCallToMethodCall->getNonArrayMethod(), $funcCall->getArgs());
}
- private function refactorEmptyFuncCallArgs(
- ArgumentFuncCallToMethodCall $argumentFuncCallToMethodCall,
- MethodCall|PropertyFetch|Variable $expr
- ): MethodCall | PropertyFetch | Variable {
+ /**
+ * @param \PhpParser\Node\Expr\MethodCall|\PhpParser\Node\Expr\PropertyFetch|\PhpParser\Node\Expr\Variable $expr
+ * @return \PhpParser\Node\Expr\MethodCall|\PhpParser\Node\Expr\PropertyFetch|\PhpParser\Node\Expr\Variable
+ */
+ private function refactorEmptyFuncCallArgs(ArgumentFuncCallToMethodCall $argumentFuncCallToMethodCall, $expr)
+ {
if ($argumentFuncCallToMethodCall->getMethodIfNoArgs() !== null) {
return $this->nodeFactory->createMethodCall($expr, $argumentFuncCallToMethodCall->getMethodIfNoArgs());
}
diff --git a/src/Rector/FuncCall/RemoveDumpDataDeadCodeRector.php b/src/Rector/FuncCall/RemoveDumpDataDeadCodeRector.php
index 25640053..3589d3a4 100644
--- a/src/Rector/FuncCall/RemoveDumpDataDeadCodeRector.php
+++ b/src/Rector/FuncCall/RemoveDumpDataDeadCodeRector.php
@@ -70,8 +70,9 @@ public function getNodeTypes(): array
/**
* @param Expression $node
+ * @return int|\PhpParser\Node|mixed[]|null
*/
- public function refactor(Node $node): int|Node|array|null
+ public function refactor(Node $node)
{
if (! $node->expr instanceof FuncCall) {
return null;
diff --git a/src/Rector/FuncCall/SleepFuncToSleepStaticCallRector.php b/src/Rector/FuncCall/SleepFuncToSleepStaticCallRector.php
index bf42a3db..cc25f105 100644
--- a/src/Rector/FuncCall/SleepFuncToSleepStaticCallRector.php
+++ b/src/Rector/FuncCall/SleepFuncToSleepStaticCallRector.php
@@ -21,16 +21,12 @@ public function getRuleDefinition(): RuleDefinition
return new RuleDefinition(
'Use Sleep::sleep() and Sleep::usleep() instead of the sleep() and usleep() function.',
[
- new CodeSample(
- <<<'CODE_SAMPLE'
+ new CodeSample(<<<'CODE_SAMPLE'
sleep(5);
CODE_SAMPLE
- ,
- <<<'CODE_SAMPLE'
+, <<<'CODE_SAMPLE'
\Illuminate\Support\Sleep::sleep(5);
-CODE_SAMPLE
- ,
- ),
+CODE_SAMPLE),
]
);
}
diff --git a/src/Rector/MethodCall/AssertStatusToAssertMethodRector.php b/src/Rector/MethodCall/AssertStatusToAssertMethodRector.php
index 3c0bbe11..5ab906fa 100644
--- a/src/Rector/MethodCall/AssertStatusToAssertMethodRector.php
+++ b/src/Rector/MethodCall/AssertStatusToAssertMethodRector.php
@@ -218,19 +218,41 @@ private function updateAssertStatusCall(MethodCall $methodCall): ?MethodCall
}
if ($argValue instanceof LNumber) {
- $replacementMethod = match ($argValue->value) {
- 200 => 'assertOk',
- 204 => 'assertNoContent',
- 401 => 'assertUnauthorized',
- 403 => 'assertForbidden',
- 404 => 'assertNotFound',
- 405 => 'assertMethodNotAllowed',
- 410 => 'assertGone',
- 422 => 'assertUnprocessable',
- 500 => 'assertInternalServerError',
- 503 => 'assertServiceUnavailable',
- default => null
- };
+ switch ($argValue->value) {
+ case 200:
+ $replacementMethod = 'assertOk';
+ break;
+ case 204:
+ $replacementMethod = 'assertNoContent';
+ break;
+ case 401:
+ $replacementMethod = 'assertUnauthorized';
+ break;
+ case 403:
+ $replacementMethod = 'assertForbidden';
+ break;
+ case 404:
+ $replacementMethod = 'assertNotFound';
+ break;
+ case 405:
+ $replacementMethod = 'assertMethodNotAllowed';
+ break;
+ case 410:
+ $replacementMethod = 'assertGone';
+ break;
+ case 422:
+ $replacementMethod = 'assertUnprocessable';
+ break;
+ case 500:
+ $replacementMethod = 'assertInternalServerError';
+ break;
+ case 503:
+ $replacementMethod = 'assertServiceUnavailable';
+ break;
+ default:
+ $replacementMethod = null;
+ break;
+ }
} else {
if (! in_array($this->getName($argValue->class), [
'Illuminate\Http\Response',
@@ -239,19 +261,41 @@ private function updateAssertStatusCall(MethodCall $methodCall): ?MethodCall
return null;
}
- $replacementMethod = match ($this->getName($argValue->name)) {
- 'HTTP_OK' => 'assertOk',
- 'HTTP_NO_CONTENT' => 'assertNoContent',
- 'HTTP_UNAUTHORIZED' => 'assertUnauthorized',
- 'HTTP_FORBIDDEN' => 'assertForbidden',
- 'HTTP_NOT_FOUND' => 'assertNotFound',
- 'HTTP_METHOD_NOT_ALLOWED' => 'assertMethodNotAllowed',
- 'HTTP_GONE' => 'assertGone',
- 'HTTP_UNPROCESSABLE_ENTITY' => 'assertUnprocessable',
- 'HTTP_INTERNAL_SERVER_ERROR' => 'assertInternalServerError',
- 'HTTP_SERVICE_UNAVAILABLE' => 'assertServiceUnavailable',
- default => null
- };
+ switch ($this->getName($argValue->name)) {
+ case 'HTTP_OK':
+ $replacementMethod = 'assertOk';
+ break;
+ case 'HTTP_NO_CONTENT':
+ $replacementMethod = 'assertNoContent';
+ break;
+ case 'HTTP_UNAUTHORIZED':
+ $replacementMethod = 'assertUnauthorized';
+ break;
+ case 'HTTP_FORBIDDEN':
+ $replacementMethod = 'assertForbidden';
+ break;
+ case 'HTTP_NOT_FOUND':
+ $replacementMethod = 'assertNotFound';
+ break;
+ case 'HTTP_METHOD_NOT_ALLOWED':
+ $replacementMethod = 'assertMethodNotAllowed';
+ break;
+ case 'HTTP_GONE':
+ $replacementMethod = 'assertGone';
+ break;
+ case 'HTTP_UNPROCESSABLE_ENTITY':
+ $replacementMethod = 'assertUnprocessable';
+ break;
+ case 'HTTP_INTERNAL_SERVER_ERROR':
+ $replacementMethod = 'assertInternalServerError';
+ break;
+ case 'HTTP_SERVICE_UNAVAILABLE':
+ $replacementMethod = 'assertServiceUnavailable';
+ break;
+ default:
+ $replacementMethod = null;
+ break;
+ }
}
if ($replacementMethod === null) {
diff --git a/src/Rector/MethodCall/ChangeQueryWhereDateValueWithCarbonRector.php b/src/Rector/MethodCall/ChangeQueryWhereDateValueWithCarbonRector.php
index bbb069f8..64a0e081 100644
--- a/src/Rector/MethodCall/ChangeQueryWhereDateValueWithCarbonRector.php
+++ b/src/Rector/MethodCall/ChangeQueryWhereDateValueWithCarbonRector.php
@@ -72,8 +72,9 @@ public function getNodeTypes(): array
/**
* @param Expression $node
+ * @return \PhpParser\Node|mixed[]|int|null
*/
- public function refactor(Node $node): Node|array|int|null
+ public function refactor(Node $node)
{
if (! $node->expr instanceof MethodCall) {
return null;
diff --git a/src/Rector/MethodCall/EloquentOrderByToLatestOrOldestRector.php b/src/Rector/MethodCall/EloquentOrderByToLatestOrOldestRector.php
index b725c6d9..922be532 100644
--- a/src/Rector/MethodCall/EloquentOrderByToLatestOrOldestRector.php
+++ b/src/Rector/MethodCall/EloquentOrderByToLatestOrOldestRector.php
@@ -26,24 +26,20 @@ public function getRuleDefinition(): RuleDefinition
return new RuleDefinition(
'Changes orderBy() to latest() or oldest()',
[
- new CodeSample(
- <<<'CODE_SAMPLE'
+ new CodeSample(<<<'CODE_SAMPLE'
use Illuminate\Database\Eloquent\Builder;
$builder->orderBy('created_at');
$builder->orderBy('created_at', 'desc');
$builder->orderBy('deleted_at');
CODE_SAMPLE
- ,
- <<<'CODE_SAMPLE'
+, <<<'CODE_SAMPLE'
use Illuminate\Database\Eloquent\Builder;
$builder->latest();
$builder->oldest();
$builder->latest('deleted_at');
-CODE_SAMPLE
- ,
- ),
+CODE_SAMPLE),
]
);
}
diff --git a/src/Rector/MethodCall/EloquentWhereRelationTypeHintingParameterRector.php b/src/Rector/MethodCall/EloquentWhereRelationTypeHintingParameterRector.php
index 311b4bef..dd2e350f 100644
--- a/src/Rector/MethodCall/EloquentWhereRelationTypeHintingParameterRector.php
+++ b/src/Rector/MethodCall/EloquentWhereRelationTypeHintingParameterRector.php
@@ -71,7 +71,10 @@ public function refactor(Node $node): ?Node
return null;
}
- private function isWhereRelationMethodWithClosureOrArrowFunction(MethodCall|StaticCall $node): bool
+ /**
+ * @param \PhpParser\Node\Expr\MethodCall|\PhpParser\Node\Expr\StaticCall $node
+ */
+ private function isWhereRelationMethodWithClosureOrArrowFunction($node): bool
{
if (! $this->expectedObjectTypeAndMethodCall($node)) {
return false;
@@ -86,7 +89,10 @@ private function isWhereRelationMethodWithClosureOrArrowFunction(MethodCall|Stat
! ($node->getArgs()[$position]->value ?? null) instanceof ArrowFunction);
}
- private function changeClosureParamType(MethodCall|StaticCall $node): void
+ /**
+ * @param \PhpParser\Node\Expr\MethodCall|\PhpParser\Node\Expr\StaticCall $node
+ */
+ private function changeClosureParamType($node): void
{
// Morph methods have the closure in the 3rd position, others use the 2nd.
$position = $this->isNames(
@@ -111,30 +117,24 @@ private function changeClosureParamType(MethodCall|StaticCall $node): void
$param->type = new FullyQualified('Illuminate\Contracts\Database\Query\Builder');
}
- private function expectedObjectTypeAndMethodCall(MethodCall|StaticCall $node): bool
+ /**
+ * @param \PhpParser\Node\Expr\MethodCall|\PhpParser\Node\Expr\StaticCall $node
+ */
+ private function expectedObjectTypeAndMethodCall($node): bool
{
- return match (true) {
- $node instanceof MethodCall && $this->isObjectType(
+ switch (true) {
+ case $node instanceof MethodCall && $this->isObjectType(
$node->var,
new ObjectType('Illuminate\Contracts\Database\Query\Builder')
- ) => true,
- $node instanceof StaticCall && $this->isObjectType(
+ ):
+ return true;
+ case $node instanceof StaticCall && $this->isObjectType(
$node->class,
new ObjectType('Illuminate\Database\Eloquent\Model')
- ) => true,
- default => false,
- } && $this->isNames(
- $node->name,
- [
- 'whereHas',
- 'orWhereHas',
- 'whereDoesntHave',
- 'orWhereDoesntHave',
- 'whereHasMorph',
- 'orWhereHasMorph',
- 'whereDoesntHaveMorph',
- 'orWhereDoesntHaveMorph',
- ]
- );
+ ):
+ return true;
+ default:
+ return false;
+ }
}
}
diff --git a/src/Rector/MethodCall/EloquentWhereTypeHintClosureParameterRector.php b/src/Rector/MethodCall/EloquentWhereTypeHintClosureParameterRector.php
index 344f473b..7f149e81 100644
--- a/src/Rector/MethodCall/EloquentWhereTypeHintClosureParameterRector.php
+++ b/src/Rector/MethodCall/EloquentWhereTypeHintClosureParameterRector.php
@@ -26,20 +26,16 @@ public function getRuleDefinition(): RuleDefinition
return new RuleDefinition(
'Change typehint of closure parameter in where method of Eloquent Builder',
[
- new CodeSample(
- <<<'CODE_SAMPLE'
+ new CodeSample(<<<'CODE_SAMPLE'
$query->where(function ($query) {
$query->where('id', 1);
});
CODE_SAMPLE
- ,
- <<<'CODE_SAMPLE'
+, <<<'CODE_SAMPLE'
$query->where(function (\Illuminate\Contracts\Database\Eloquent\Builder $query) {
$query->where('id', 1);
});
-CODE_SAMPLE
- ,
- ),
+CODE_SAMPLE),
]
);
}
@@ -64,7 +60,10 @@ public function refactor(Node $node): ?Node
return null;
}
- private function isWhereMethodWithClosureOrArrowFunction(MethodCall|StaticCall $node): bool
+ /**
+ * @param \PhpParser\Node\Expr\MethodCall|\PhpParser\Node\Expr\StaticCall $node
+ */
+ private function isWhereMethodWithClosureOrArrowFunction($node): bool
{
if (! $this->expectedObjectTypeAndMethodCall($node)) {
return false;
@@ -73,7 +72,10 @@ private function isWhereMethodWithClosureOrArrowFunction(MethodCall|StaticCall $
! ($node->getArgs()[0]->value ?? null) instanceof ArrowFunction);
}
- private function changeClosureParamType(MethodCall|StaticCall $node): void
+ /**
+ * @param \PhpParser\Node\Expr\MethodCall|\PhpParser\Node\Expr\StaticCall $node
+ */
+ private function changeClosureParamType($node): void
{
/** @var Node\Expr\ArrowFunction|Node\Expr\Closure $closure */
$closure = $node->getArgs()[0]
@@ -92,18 +94,24 @@ private function changeClosureParamType(MethodCall|StaticCall $node): void
$param->type = new FullyQualified('Illuminate\Contracts\Database\Query\Builder');
}
- private function expectedObjectTypeAndMethodCall(MethodCall|StaticCall $node): bool
+ /**
+ * @param \PhpParser\Node\Expr\MethodCall|\PhpParser\Node\Expr\StaticCall $node
+ */
+ private function expectedObjectTypeAndMethodCall($node): bool
{
- return match (true) {
- $node instanceof MethodCall && $this->isObjectType(
+ switch (true) {
+ case $node instanceof MethodCall && $this->isObjectType(
$node->var,
new ObjectType('Illuminate\Contracts\Database\Query\Builder')
- ) => true,
- $node instanceof StaticCall && $this->isObjectType(
+ ):
+ return true;
+ case $node instanceof StaticCall && $this->isObjectType(
$node->class,
new ObjectType('Illuminate\Database\Eloquent\Model')
- ) => true,
- default => false,
- } && $this->isNames($node->name, ['where', 'orWhere']);
+ ):
+ return true;
+ default:
+ return false;
+ }
}
}
diff --git a/src/Rector/MethodCall/FactoryApplyingStatesRector.php b/src/Rector/MethodCall/FactoryApplyingStatesRector.php
index 8a1b0bfc..d2b49bff 100644
--- a/src/Rector/MethodCall/FactoryApplyingStatesRector.php
+++ b/src/Rector/MethodCall/FactoryApplyingStatesRector.php
@@ -84,6 +84,8 @@ private function getStatesFromArgs(array $args): array
return (array) $this->valueResolver->getValue($args[0]->value);
}
- return array_map(fn ($arg) => $arg instanceof Arg ? $this->valueResolver->getValue($arg->value) : null, $args);
+ return array_map(function ($arg) {
+ return $arg instanceof Arg ? $this->valueResolver->getValue($arg->value) : null;
+ }, $args);
}
}
diff --git a/src/Rector/MethodCall/LumenRoutesStringActionToUsesArrayRector.php b/src/Rector/MethodCall/LumenRoutesStringActionToUsesArrayRector.php
index cde75f59..60bc3a2d 100644
--- a/src/Rector/MethodCall/LumenRoutesStringActionToUsesArrayRector.php
+++ b/src/Rector/MethodCall/LumenRoutesStringActionToUsesArrayRector.php
@@ -20,21 +20,30 @@
*/
final class LumenRoutesStringActionToUsesArrayRector extends AbstractRector
{
- public function __construct(
- private readonly LumenRouteRegisteringMethodAnalyzer $lumenRouteRegisteringMethodAnalyzer
- ) {
+ /**
+ * @readonly
+ * @var \RectorLaravel\NodeAnalyzer\LumenRouteRegisteringMethodAnalyzer
+ */
+ private $lumenRouteRegisteringMethodAnalyzer;
+
+ public function __construct(LumenRouteRegisteringMethodAnalyzer $lumenRouteRegisteringMethodAnalyzer)
+ {
+ $this->lumenRouteRegisteringMethodAnalyzer = $lumenRouteRegisteringMethodAnalyzer;
}
public function getRuleDefinition(): RuleDefinition
{
return new RuleDefinition(
'Changes action in rule definitions from string to array notation.',
- [new CodeSample(<<<'CODE_SAMPLE'
+ [new CodeSample(
+ <<<'CODE_SAMPLE'
$router->get('/user', 'UserController@get');
CODE_SAMPLE
- , <<<'CODE_SAMPLE'
+ ,
+ <<<'CODE_SAMPLE'
$router->get('/user', ['uses => 'UserController@get']);
-CODE_SAMPLE)]
+CODE_SAMPLE
+ )]
);
}
diff --git a/src/Rector/MethodCall/LumenRoutesStringMiddlewareToArrayRector.php b/src/Rector/MethodCall/LumenRoutesStringMiddlewareToArrayRector.php
index 703ce16e..bac13122 100644
--- a/src/Rector/MethodCall/LumenRoutesStringMiddlewareToArrayRector.php
+++ b/src/Rector/MethodCall/LumenRoutesStringMiddlewareToArrayRector.php
@@ -19,23 +19,32 @@
*/
final class LumenRoutesStringMiddlewareToArrayRector extends AbstractRector
{
- public function __construct(
- private readonly LumenRouteRegisteringMethodAnalyzer $lumenRouteRegisteringMethodAnalyzer
- ) {
+ /**
+ * @readonly
+ * @var \RectorLaravel\NodeAnalyzer\LumenRouteRegisteringMethodAnalyzer
+ */
+ private $lumenRouteRegisteringMethodAnalyzer;
+
+ public function __construct(LumenRouteRegisteringMethodAnalyzer $lumenRouteRegisteringMethodAnalyzer)
+ {
+ $this->lumenRouteRegisteringMethodAnalyzer = $lumenRouteRegisteringMethodAnalyzer;
}
public function getRuleDefinition(): RuleDefinition
{
return new RuleDefinition(
'Changes middlewares from rule definitions from string to array notation.',
- [new CodeSample(<<<'CODE_SAMPLE'
+ [new CodeSample(
+ <<<'CODE_SAMPLE'
$router->get('/user', ['middleware => 'test']);
$router->post('/user', ['middleware => 'test|authentication']);
CODE_SAMPLE
- , <<<'CODE_SAMPLE'
+ ,
+ <<<'CODE_SAMPLE'
$router->get('/user', ['middleware => ['test']]);
$router->post('/user', ['middleware => ['test', 'authentication']]);
-CODE_SAMPLE)]
+CODE_SAMPLE
+ )]
);
}
diff --git a/src/Rector/MethodCall/RedirectBackToBackHelperRector.php b/src/Rector/MethodCall/RedirectBackToBackHelperRector.php
index 1e04fe83..0ff71e8e 100644
--- a/src/Rector/MethodCall/RedirectBackToBackHelperRector.php
+++ b/src/Rector/MethodCall/RedirectBackToBackHelperRector.php
@@ -83,7 +83,7 @@ public function refactor(Node $node): ?Node
return $this->updateRedirectStaticCall($node);
}
- private function updateRedirectHelperCall(MethodCall $methodCall): FuncCall|null
+ private function updateRedirectHelperCall(MethodCall $methodCall): ?\PhpParser\Node\Expr\FuncCall
{
if (! $this->isName($methodCall->name, 'back')) {
return null;
diff --git a/src/Rector/MethodCall/UseComponentPropertyWithinCommandsRector.php b/src/Rector/MethodCall/UseComponentPropertyWithinCommandsRector.php
index dc2cbafe..ed96f1c5 100644
--- a/src/Rector/MethodCall/UseComponentPropertyWithinCommandsRector.php
+++ b/src/Rector/MethodCall/UseComponentPropertyWithinCommandsRector.php
@@ -25,8 +25,7 @@ class UseComponentPropertyWithinCommandsRector extends AbstractRector
public function getRuleDefinition(): RuleDefinition
{
return new RuleDefinition('Use $this->components property within commands', [
- new CodeSample(
- <<<'CODE_SAMPLE'
+ new CodeSample(<<<'CODE_SAMPLE'
use Illuminate\Console\Command;
class CommandWithComponents extends Command
@@ -40,8 +39,7 @@ public function handle()
}
}
CODE_SAMPLE
- ,
- <<<'CODE_SAMPLE'
+, <<<'CODE_SAMPLE'
use Illuminate\Console\Command;
class CommandWithComponents extends Command
@@ -54,9 +52,7 @@ public function handle()
$this->components->error('Error!');
}
}
-CODE_SAMPLE
- ,
- ),
+CODE_SAMPLE),
]);
}
diff --git a/src/Rector/Namespace_/FactoryDefinitionRector.php b/src/Rector/Namespace_/FactoryDefinitionRector.php
index 4d0b22bd..2e93529b 100644
--- a/src/Rector/Namespace_/FactoryDefinitionRector.php
+++ b/src/Rector/Namespace_/FactoryDefinitionRector.php
@@ -30,9 +30,15 @@
*/
final class FactoryDefinitionRector extends AbstractRector
{
- public function __construct(
- private readonly ModelFactoryNodeFactory $modelFactoryNodeFactory
- ) {
+ /**
+ * @readonly
+ * @var \RectorLaravel\NodeFactory\ModelFactoryNodeFactory
+ */
+ private $modelFactoryNodeFactory;
+
+ public function __construct(ModelFactoryNodeFactory $modelFactoryNodeFactory)
+ {
+ $this->modelFactoryNodeFactory = $modelFactoryNodeFactory;
}
public function getRuleDefinition(): RuleDefinition
diff --git a/src/Rector/New_/AddGuardToLoginEventRector.php b/src/Rector/New_/AddGuardToLoginEventRector.php
index 7bee8e41..c8e10a2c 100644
--- a/src/Rector/New_/AddGuardToLoginEventRector.php
+++ b/src/Rector/New_/AddGuardToLoginEventRector.php
@@ -68,8 +68,9 @@ public function getNodeTypes(): array
/**
* @param Expression $node
+ * @return \PhpParser\Node|mixed[]|int|null
*/
- public function refactor(Node $node): Node|array|int|null
+ public function refactor(Node $node)
{
$newNode = $this->getNewNode($node);
@@ -100,7 +101,7 @@ private function createGuardAssign(Variable $guardVariable): Assign
return new Assign($guardVariable, $this->nodeFactory->createFuncCall('config', [$string]));
}
- private function getNewNode(Expression $expression): New_|null
+ private function getNewNode(Expression $expression): ?\PhpParser\Node\Expr\New_
{
if ($expression->expr instanceof Assign && $expression->expr->expr instanceof New_) {
return $expression->expr->expr;
diff --git a/src/Rector/PropertyFetch/OptionalToNullsafeOperatorRector.php b/src/Rector/PropertyFetch/OptionalToNullsafeOperatorRector.php
index 58817192..a8ce00f6 100644
--- a/src/Rector/PropertyFetch/OptionalToNullsafeOperatorRector.php
+++ b/src/Rector/PropertyFetch/OptionalToNullsafeOperatorRector.php
@@ -36,7 +36,7 @@ final class OptionalToNullsafeOperatorRector extends AbstractRector implements M
/**
* @var string
*/
- final public const EXCLUDE_METHODS = 'exclude_methods';
+ public const EXCLUDE_METHODS = 'exclude_methods';
/**
* @var array>
@@ -46,7 +46,7 @@ final class OptionalToNullsafeOperatorRector extends AbstractRector implements M
/**
* @var string[]
*/
- private array $excludeMethods = [];
+ private $excludeMethods = [];
public function getRuleDefinition(): RuleDefinition
{
diff --git a/src/Rector/PropertyFetch/ReplaceFakerInstanceWithHelperRector.php b/src/Rector/PropertyFetch/ReplaceFakerInstanceWithHelperRector.php
index 8a08e27b..50588577 100644
--- a/src/Rector/PropertyFetch/ReplaceFakerInstanceWithHelperRector.php
+++ b/src/Rector/PropertyFetch/ReplaceFakerInstanceWithHelperRector.php
@@ -19,9 +19,15 @@
*/
final class ReplaceFakerInstanceWithHelperRector extends AbstractRector
{
- public function __construct(
- private readonly ReflectionResolver $reflectionResolver
- ) {
+ /**
+ * @readonly
+ * @var \Rector\Core\Reflection\ReflectionResolver
+ */
+ private $reflectionResolver;
+
+ public function __construct(ReflectionResolver $reflectionResolver)
+ {
+ $this->reflectionResolver = $reflectionResolver;
}
public function getRuleDefinition(): RuleDefinition
@@ -104,7 +110,11 @@ public function refactor(Node $node): ?Node
return null;
}
- private function refactorPropertyFetch(MethodCall|PropertyFetch $node): MethodCall|PropertyFetch|null
+ /**
+ * @param \PhpParser\Node\Expr\MethodCall|\PhpParser\Node\Expr\PropertyFetch $node
+ * @return \PhpParser\Node\Expr\MethodCall|\PhpParser\Node\Expr\PropertyFetch|null
+ */
+ private function refactorPropertyFetch($node)
{
if (! $node->var instanceof PropertyFetch) {
return null;
diff --git a/src/Rector/StaticCall/EloquentMagicMethodToQueryBuilderRector.php b/src/Rector/StaticCall/EloquentMagicMethodToQueryBuilderRector.php
index cbfc2eb0..4f86acec 100644
--- a/src/Rector/StaticCall/EloquentMagicMethodToQueryBuilderRector.php
+++ b/src/Rector/StaticCall/EloquentMagicMethodToQueryBuilderRector.php
@@ -26,21 +26,22 @@ public function getRuleDefinition(): RuleDefinition
return new RuleDefinition(
'The EloquentMagicMethodToQueryBuilderRule is designed to automatically transform certain magic method calls on Eloquent Models into corresponding Query Builder method calls.',
[
- new CodeSample(
- <<<'CODE_SAMPLE'
+ new CodeSample(
+ <<<'CODE_SAMPLE'
use App\Models\User;
$user = User::find(1);
CODE_SAMPLE
-,
- <<<'CODE_SAMPLE'
+ ,
+ <<<'CODE_SAMPLE'
use App\Models\User;
$user = User::query()->find(1);
CODE_SAMPLE
- ),
-
- ]);
+ ),
+
+ ]
+ );
}
/**
@@ -109,7 +110,7 @@ public function isMagicMethod(string $className, string $methodName): bool
{
try {
$reflectionMethod = new ReflectionMethod($className, $methodName);
- } catch (ReflectionException) {
+ } catch (ReflectionException $exception) {
return true; // method does not exist => is magic method
}
@@ -130,7 +131,7 @@ public function isPublicMethod(string $className, string $methodName): bool
if ($reflectionMethod->isStatic()) {
return false;
}
- } catch (ReflectionException) {
+ } catch (ReflectionException $exception) {
return false; // method does not exist => is magic method
}
diff --git a/src/Rector/StaticCall/MinutesToSecondsInCacheRector.php b/src/Rector/StaticCall/MinutesToSecondsInCacheRector.php
index 8897967f..0600ecc6 100644
--- a/src/Rector/StaticCall/MinutesToSecondsInCacheRector.php
+++ b/src/Rector/StaticCall/MinutesToSecondsInCacheRector.php
@@ -42,7 +42,7 @@ final class MinutesToSecondsInCacheRector extends AbstractRector
/**
* @var TypeToTimeMethodAndPosition[]
*/
- private array $typeToTimeMethodsAndPositions = [];
+ private $typeToTimeMethodsAndPositions = [];
public function __construct()
{
@@ -133,11 +133,12 @@ public function refactor(Node $node): ?Node
return $node;
}
- private function processArgumentOnPosition(
- StaticCall | MethodCall $node,
- Expr $argExpr,
- int $argumentPosition
- ): StaticCall | MethodCall | null {
+ /**
+ * @param \PhpParser\Node\Expr\StaticCall|\PhpParser\Node\Expr\MethodCall $node
+ * @return \PhpParser\Node\Expr\StaticCall|\PhpParser\Node\Expr\MethodCall|null
+ */
+ private function processArgumentOnPosition($node, Expr $argExpr, int $argumentPosition)
+ {
if (! $this->nodeTypeResolver->isNumberType($argExpr)) {
return null;
}
diff --git a/src/Rector/StaticCall/Redirect301ToPermanentRedirectRector.php b/src/Rector/StaticCall/Redirect301ToPermanentRedirectRector.php
index 02c90a17..b6baeba9 100644
--- a/src/Rector/StaticCall/Redirect301ToPermanentRedirectRector.php
+++ b/src/Rector/StaticCall/Redirect301ToPermanentRedirectRector.php
@@ -22,7 +22,7 @@ final class Redirect301ToPermanentRedirectRector extends AbstractRector
/**
* @var ObjectType[]
*/
- private array $routerObjectTypes = [];
+ private $routerObjectTypes = [];
public function __construct()
{
diff --git a/src/Rector/StaticCall/RequestStaticValidateToInjectRector.php b/src/Rector/StaticCall/RequestStaticValidateToInjectRector.php
index 6c518c23..2168af7b 100644
--- a/src/Rector/StaticCall/RequestStaticValidateToInjectRector.php
+++ b/src/Rector/StaticCall/RequestStaticValidateToInjectRector.php
@@ -27,14 +27,20 @@
*/
final class RequestStaticValidateToInjectRector extends AbstractScopeAwareRector
{
+ /**
+ * @readonly
+ * @var \Rector\Core\Reflection\ReflectionResolver
+ */
+ private $reflectionResolver;
+
/**
* @var ObjectType[]
*/
- private array $requestObjectTypes = [];
+ private $requestObjectTypes = [];
- public function __construct(
- private readonly ReflectionResolver $reflectionResolver
- ) {
+ public function __construct(ReflectionResolver $reflectionResolver)
+ {
+ $this->reflectionResolver = $reflectionResolver;
$this->requestObjectTypes = [new ObjectType('Illuminate\Http\Request'), new ObjectType('Request')];
}
@@ -114,7 +120,10 @@ public function refactorWithScope(Node $node, Scope $scope): ?Node
return null;
}
- private function shouldSkip(ClassMethod $classMethod, StaticCall|FuncCall $node, Scope $scope): bool
+ /**
+ * @param \PhpParser\Node\Expr\StaticCall|\PhpParser\Node\Expr\FuncCall $node
+ */
+ private function shouldSkip(ClassMethod $classMethod, $node, Scope $scope): bool
{
$classReflection = $scope->getClassReflection();
@@ -130,7 +139,7 @@ private function shouldSkip(ClassMethod $classMethod, StaticCall|FuncCall $node,
$classMethod,
$scope
);
- $classMethodNamespaceName = $classMethodReflection?->getPrototype()?->getDeclaringClass()?->getName();
+ $classMethodNamespaceName = ($nullsafeVariable1 = ($nullsafeVariable2 = ($nullsafeVariable3 = $classMethodReflection) ? $nullsafeVariable3->getPrototype() : null) ? $nullsafeVariable2->getDeclaringClass() : null) ? $nullsafeVariable1->getName() : null;
if ($classMethodNamespaceName !== $classReflection->getName()) {
return true;
}
diff --git a/src/Rector/StaticCall/RouteActionCallableRector.php b/src/Rector/StaticCall/RouteActionCallableRector.php
index ee34e925..86a18ef0 100644
--- a/src/Rector/StaticCall/RouteActionCallableRector.php
+++ b/src/Rector/StaticCall/RouteActionCallableRector.php
@@ -6,12 +6,10 @@
use PhpParser\Node;
use PhpParser\Node\Arg;
-use PhpParser\Node\Expr;
use PhpParser\Node\Expr\Array_;
use PhpParser\Node\Expr\ArrayItem;
use PhpParser\Node\Expr\MethodCall;
use PhpParser\Node\Expr\StaticCall;
-use PhpParser\Node\Identifier;
use PhpParser\Node\Scalar\String_;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\Php\PhpMethodReflection;
@@ -34,29 +32,46 @@ final class RouteActionCallableRector extends AbstractRector implements Configur
/**
* @var string
*/
- final public const ROUTES = 'routes';
+ public const ROUTES = 'routes';
/**
* @var string
*/
- final public const NAMESPACE = 'namespace';
+ public const NAMESPACE = 'namespace';
/**
* @var string
*/
private const DEFAULT_NAMESPACE = 'App\Http\Controllers';
- private string $namespace = self::DEFAULT_NAMESPACE;
+ /**
+ * @readonly
+ * @var \Rector\Core\Reflection\ReflectionResolver
+ */
+ private $reflectionResolver;
+
+ /**
+ * @readonly
+ * @var \RectorLaravel\NodeFactory\RouterRegisterNodeAnalyzer
+ */
+ private $routerRegisterNodeAnalyzer;
+
+ /**
+ * @var string
+ */
+ private $namespace = self::DEFAULT_NAMESPACE;
/**
* @var array
*/
- private array $routes = [];
+ private $routes = [];
public function __construct(
- private readonly ReflectionResolver $reflectionResolver,
- private readonly RouterRegisterNodeAnalyzer $routerRegisterNodeAnalyzer
+ ReflectionResolver $reflectionResolver,
+ RouterRegisterNodeAnalyzer $routerRegisterNodeAnalyzer
) {
+ $this->reflectionResolver = $reflectionResolver;
+ $this->routerRegisterNodeAnalyzer = $routerRegisterNodeAnalyzer;
}
public function getRuleDefinition(): RuleDefinition
@@ -143,7 +158,9 @@ public function refactor(Node $node): ?Node
$argument = new String_($argValue['middleware']);
} else {
$argument = new Array_(array_map(
- static fn ($value) => new ArrayItem(new String_($value)),
+ static function ($value) {
+ return new ArrayItem(new String_($value));
+ },
$argValue['middleware']
));
}
@@ -171,8 +188,9 @@ public function configure(array $configuration): void
/**
* @return array{string, string}|null
+ * @param mixed $action
*/
- private function resolveControllerFromAction(mixed $action): ?array
+ private function resolveControllerFromAction($action): ?array
{
if (! $this->isActionString($action)) {
return null;
@@ -189,14 +207,17 @@ private function resolveControllerFromAction(mixed $action): ?array
[$controller, $method] = $segments;
$namespace = $this->getNamespace($this->file->getFilePath());
- if (! str_starts_with($controller, '\\')) {
+ if (strncmp($controller, '\\', strlen('\\')) !== 0) {
$controller = $namespace . '\\' . $controller;
}
return [$controller, $method];
}
- private function getActionPosition(Identifier|Expr $name): int
+ /**
+ * @param \PhpParser\Node\Identifier|\PhpParser\Node\Expr $name
+ */
+ private function getActionPosition($name): int
{
if ($this->routerRegisterNodeAnalyzer->isRegisterFallback($name)) {
return 0;
@@ -209,7 +230,10 @@ private function getActionPosition(Identifier|Expr $name): int
return 1;
}
- private function isActionString(mixed $action): bool
+ /**
+ * @param mixed $action
+ */
+ private function isActionString($action): bool
{
if (! is_string($action)) {
if (! is_array($action)) {
@@ -222,7 +246,7 @@ private function isActionString(mixed $action): bool
return in_array('uses', $keys, true) && array_diff($keys, ['as', 'middleware', 'uses']) === [];
}
- return str_contains($action, '@');
+ return strpos($action, '@') !== false;
}
private function getNamespace(string $filePath): string
diff --git a/src/Set/LaravelLevelSetList.php b/src/Set/LaravelLevelSetList.php
index cd85d132..9d5c93f1 100644
--- a/src/Set/LaravelLevelSetList.php
+++ b/src/Set/LaravelLevelSetList.php
@@ -11,65 +11,65 @@ final class LaravelLevelSetList implements SetListInterface
/**
* @var string
*/
- final public const UP_TO_LARAVEL_51 = __DIR__ . '/../../config/sets/level/up-to-laravel-51.php';
+ public const UP_TO_LARAVEL_51 = __DIR__ . '/../../config/sets/level/up-to-laravel-51.php';
/**
* @var string
*/
- final public const UP_TO_LARAVEL_52 = __DIR__ . '/../../config/sets/level/up-to-laravel-52.php';
+ public const UP_TO_LARAVEL_52 = __DIR__ . '/../../config/sets/level/up-to-laravel-52.php';
/**
* @var string
*/
- final public const UP_TO_LARAVEL_53 = __DIR__ . '/../../config/sets/level/up-to-laravel-53.php';
+ public const UP_TO_LARAVEL_53 = __DIR__ . '/../../config/sets/level/up-to-laravel-53.php';
/**
* @var string
*/
- final public const UP_TO_LARAVEL_54 = __DIR__ . '/../../config/sets/level/up-to-laravel-54.php';
+ public const UP_TO_LARAVEL_54 = __DIR__ . '/../../config/sets/level/up-to-laravel-54.php';
/**
* @var string
*/
- final public const UP_TO_LARAVEL_55 = __DIR__ . '/../../config/sets/level/up-to-laravel-55.php';
+ public const UP_TO_LARAVEL_55 = __DIR__ . '/../../config/sets/level/up-to-laravel-55.php';
/**
* @var string
*/
- final public const UP_TO_LARAVEL_56 = __DIR__ . '/../../config/sets/level/up-to-laravel-56.php';
+ public const UP_TO_LARAVEL_56 = __DIR__ . '/../../config/sets/level/up-to-laravel-56.php';
/**
* @var string
*/
- final public const UP_TO_LARAVEL_57 = __DIR__ . '/../../config/sets/level/up-to-laravel-57.php';
+ public const UP_TO_LARAVEL_57 = __DIR__ . '/../../config/sets/level/up-to-laravel-57.php';
/**
* @var string
*/
- final public const UP_TO_LARAVEL_58 = __DIR__ . '/../../config/sets/level/up-to-laravel-58.php';
+ public const UP_TO_LARAVEL_58 = __DIR__ . '/../../config/sets/level/up-to-laravel-58.php';
/**
* @var string
*/
- final public const UP_TO_LARAVEL_60 = __DIR__ . '/../../config/sets/level/up-to-laravel-60.php';
+ public const UP_TO_LARAVEL_60 = __DIR__ . '/../../config/sets/level/up-to-laravel-60.php';
/**
* @var string
*/
- final public const UP_TO_LARAVEL_70 = __DIR__ . '/../../config/sets/level/up-to-laravel-70.php';
+ public const UP_TO_LARAVEL_70 = __DIR__ . '/../../config/sets/level/up-to-laravel-70.php';
/**
* @var string
*/
- final public const UP_TO_LARAVEL_80 = __DIR__ . '/../../config/sets/level/up-to-laravel-80.php';
+ public const UP_TO_LARAVEL_80 = __DIR__ . '/../../config/sets/level/up-to-laravel-80.php';
/**
* @var string
*/
- final public const UP_TO_LARAVEL_90 = __DIR__ . '/../../config/sets/level/up-to-laravel-90.php';
+ public const UP_TO_LARAVEL_90 = __DIR__ . '/../../config/sets/level/up-to-laravel-90.php';
/**
* @var string
*/
- final public const UP_TO_LARAVEL_100 = __DIR__ . '/../../config/sets/level/up-to-laravel-100.php';
+ public const UP_TO_LARAVEL_100 = __DIR__ . '/../../config/sets/level/up-to-laravel-100.php';
}
diff --git a/src/Set/LaravelSetList.php b/src/Set/LaravelSetList.php
index f01c35a5..ca8b174a 100644
--- a/src/Set/LaravelSetList.php
+++ b/src/Set/LaravelSetList.php
@@ -11,105 +11,105 @@ final class LaravelSetList implements SetListInterface
/**
* @var string
*/
- final public const ARRAY_STR_FUNCTIONS_TO_STATIC_CALL = __DIR__ . '/../../config/sets/laravel-array-str-functions-to-static-call.php';
+ public const ARRAY_STR_FUNCTIONS_TO_STATIC_CALL = __DIR__ . '/../../config/sets/laravel-array-str-functions-to-static-call.php';
/**
* @var string
*/
- final public const LARAVEL_50 = __DIR__ . '/../../config/sets/laravel50.php';
+ public const LARAVEL_50 = __DIR__ . '/../../config/sets/laravel50.php';
/**
* @var string
*/
- final public const LARAVEL_51 = __DIR__ . '/../../config/sets/laravel51.php';
+ public const LARAVEL_51 = __DIR__ . '/../../config/sets/laravel51.php';
/**
* @var string
*/
- final public const LARAVEL_52 = __DIR__ . '/../../config/sets/laravel52.php';
+ public const LARAVEL_52 = __DIR__ . '/../../config/sets/laravel52.php';
/**
* @var string
*/
- final public const LARAVEL_53 = __DIR__ . '/../../config/sets/laravel53.php';
+ public const LARAVEL_53 = __DIR__ . '/../../config/sets/laravel53.php';
/**
* @var string
*/
- final public const LARAVEL_54 = __DIR__ . '/../../config/sets/laravel54.php';
+ public const LARAVEL_54 = __DIR__ . '/../../config/sets/laravel54.php';
/**
* @var string
*/
- final public const LARAVEL_55 = __DIR__ . '/../../config/sets/laravel55.php';
+ public const LARAVEL_55 = __DIR__ . '/../../config/sets/laravel55.php';
/**
* @var string
*/
- final public const LARAVEL_56 = __DIR__ . '/../../config/sets/laravel56.php';
+ public const LARAVEL_56 = __DIR__ . '/../../config/sets/laravel56.php';
/**
* @var string
*/
- final public const LARAVEL_57 = __DIR__ . '/../../config/sets/laravel57.php';
+ public const LARAVEL_57 = __DIR__ . '/../../config/sets/laravel57.php';
/**
* @var string
*/
- final public const LARAVEL_58 = __DIR__ . '/../../config/sets/laravel58.php';
+ public const LARAVEL_58 = __DIR__ . '/../../config/sets/laravel58.php';
/**
* @var string
*/
- final public const LARAVEL_60 = __DIR__ . '/../../config/sets/laravel60.php';
+ public const LARAVEL_60 = __DIR__ . '/../../config/sets/laravel60.php';
/**
* @var string
*/
- final public const LARAVEL_70 = __DIR__ . '/../../config/sets/laravel70.php';
+ public const LARAVEL_70 = __DIR__ . '/../../config/sets/laravel70.php';
/**
* @var string
*/
- final public const LARAVEL_80 = __DIR__ . '/../../config/sets/laravel80.php';
+ public const LARAVEL_80 = __DIR__ . '/../../config/sets/laravel80.php';
/**
* @var string
*/
- final public const LARAVEL_90 = __DIR__ . '/../../config/sets/laravel90.php';
+ public const LARAVEL_90 = __DIR__ . '/../../config/sets/laravel90.php';
/**
* @var string
*/
- final public const LARAVEL_100 = __DIR__ . '/../../config/sets/laravel100.php';
+ public const LARAVEL_100 = __DIR__ . '/../../config/sets/laravel100.php';
/**
* @var string
*/
- final public const LARAVEL_STATIC_TO_INJECTION = __DIR__ . '/../../config/sets/laravel-static-to-injection.php';
+ public const LARAVEL_STATIC_TO_INJECTION = __DIR__ . '/../../config/sets/laravel-static-to-injection.php';
/**
* @var string
*/
- final public const LARAVEL_CODE_QUALITY = __DIR__ . '/../../config/sets/laravel-code-quality.php';
+ public const LARAVEL_CODE_QUALITY = __DIR__ . '/../../config/sets/laravel-code-quality.php';
/**
* @var string
*/
- final public const LARAVEL_ARRAY_STR_FUNCTION_TO_STATIC_CALL = __DIR__ . '/../../config/sets/laravel-array-str-functions-to-static-call.php';
+ public const LARAVEL_ARRAY_STR_FUNCTION_TO_STATIC_CALL = __DIR__ . '/../../config/sets/laravel-array-str-functions-to-static-call.php';
/**
* @var string
*/
- final public const LARAVEL_LEGACY_FACTORIES_TO_CLASSES = __DIR__ . '/../../config/sets/laravel-legacy-factories-to-classes.php';
+ public const LARAVEL_LEGACY_FACTORIES_TO_CLASSES = __DIR__ . '/../../config/sets/laravel-legacy-factories-to-classes.php';
/**
* @var string
*/
- final public const LARAVEL_FACADE_ALIASES_TO_FULL_NAMES = __DIR__ . '/../../config/sets/laravel-facade-aliases-to-full-names.php';
+ public const LARAVEL_FACADE_ALIASES_TO_FULL_NAMES = __DIR__ . '/../../config/sets/laravel-facade-aliases-to-full-names.php';
/**
* @var string
*/
- final public const LARAVEL_ELOQUENT_MAGIC_METHOD_TO_QUERY_BUILDER = __DIR__ . '/../../config/sets/laravel-eloquent-magic-method-to-query-builder.php';
+ public const LARAVEL_ELOQUENT_MAGIC_METHOD_TO_QUERY_BUILDER = __DIR__ . '/../../config/sets/laravel-eloquent-magic-method-to-query-builder.php';
}
diff --git a/src/Set/Packages/Cashier/CashierLevelSetList.php b/src/Set/Packages/Cashier/CashierLevelSetList.php
index b2fa4ee1..1bd7dcde 100644
--- a/src/Set/Packages/Cashier/CashierLevelSetList.php
+++ b/src/Set/Packages/Cashier/CashierLevelSetList.php
@@ -11,10 +11,10 @@ final class CashierLevelSetList implements SetListInterface
/**
* @var string
*/
- final public const UP_TO_LARAVEL_CASHIER_130 = __DIR__ . '/../../../../config/sets/packages/cashier/level/up-to-cashier-13.php';
+ public const UP_TO_LARAVEL_CASHIER_130 = __DIR__ . '/../../../../config/sets/packages/cashier/level/up-to-cashier-13.php';
/**
* @var string
*/
- final public const UP_TO_LARAVEL_CASHIER_140 = __DIR__ . '/../../../../config/sets/packages/cashier/level/up-to-cashier-14.php';
+ public const UP_TO_LARAVEL_CASHIER_140 = __DIR__ . '/../../../../config/sets/packages/cashier/level/up-to-cashier-14.php';
}
diff --git a/src/Set/Packages/Cashier/CashierSetList.php b/src/Set/Packages/Cashier/CashierSetList.php
index ca727341..9698d07e 100644
--- a/src/Set/Packages/Cashier/CashierSetList.php
+++ b/src/Set/Packages/Cashier/CashierSetList.php
@@ -11,10 +11,10 @@ final class CashierSetList implements SetListInterface
/**
* @var string
*/
- final public const LARAVEL_CASHIER_130 = __DIR__ . '/../../../../config/sets/packages/cashier/cashier-13.php';
+ public const LARAVEL_CASHIER_130 = __DIR__ . '/../../../../config/sets/packages/cashier/cashier-13.php';
/**
* @var string
*/
- final public const LARAVEL_CASHIER_140 = __DIR__ . '/../../../../config/sets/packages/cashier/cashier-14.php';
+ public const LARAVEL_CASHIER_140 = __DIR__ . '/../../../../config/sets/packages/cashier/cashier-14.php';
}
diff --git a/src/ValueObject/AddArgumentDefaultValue.php b/src/ValueObject/AddArgumentDefaultValue.php
index e8a55283..98b11e52 100644
--- a/src/ValueObject/AddArgumentDefaultValue.php
+++ b/src/ValueObject/AddArgumentDefaultValue.php
@@ -8,12 +8,39 @@
final class AddArgumentDefaultValue
{
- public function __construct(
- private readonly string $class,
- private readonly string $method,
- private readonly int $position,
- private readonly mixed $defaultValue
- ) {
+ /**
+ * @readonly
+ * @var string
+ */
+ private $class;
+
+ /**
+ * @readonly
+ * @var string
+ */
+ private $method;
+
+ /**
+ * @readonly
+ * @var int
+ */
+ private $position;
+
+ /**
+ * @readonly
+ * @var mixed
+ */
+ private $defaultValue;
+
+ /**
+ * @param mixed $defaultValue
+ */
+ public function __construct(string $class, string $method, int $position, $defaultValue)
+ {
+ $this->class = $class;
+ $this->method = $method;
+ $this->position = $position;
+ $this->defaultValue = $defaultValue;
}
public function getObjectType(): ObjectType
@@ -31,7 +58,10 @@ public function getPosition(): int
return $this->position;
}
- public function getDefaultValue(): mixed
+ /**
+ * @return mixed
+ */
+ public function getDefaultValue()
{
return $this->defaultValue;
}
diff --git a/src/ValueObject/ArgumentFuncCallToMethodCall.php b/src/ValueObject/ArgumentFuncCallToMethodCall.php
index ad8e967a..5ceb83b9 100644
--- a/src/ValueObject/ArgumentFuncCallToMethodCall.php
+++ b/src/ValueObject/ArgumentFuncCallToMethodCall.php
@@ -9,12 +9,40 @@
final class ArgumentFuncCallToMethodCall implements ArgumentFuncCallToMethodCallInterface
{
+ /**
+ * @readonly
+ * @var string
+ */
+ private $function;
+
+ /**
+ * @readonly
+ * @var string
+ */
+ private $class;
+
+ /**
+ * @readonly
+ * @var string|null
+ */
+ private $methodIfArgs;
+
+ /**
+ * @readonly
+ * @var string|null
+ */
+ private $methodIfNoArgs;
+
public function __construct(
- private readonly string $function,
- private readonly string $class,
- private readonly ?string $methodIfArgs = null,
- private readonly ?string $methodIfNoArgs = null
+ string $function,
+ string $class,
+ ?string $methodIfArgs = null,
+ ?string $methodIfNoArgs = null
) {
+ $this->function = $function;
+ $this->class = $class;
+ $this->methodIfArgs = $methodIfArgs;
+ $this->methodIfNoArgs = $methodIfNoArgs;
RectorAssert::className($class);
RectorAssert::functionName($function);
}
diff --git a/src/ValueObject/ArrayFuncCallToMethodCall.php b/src/ValueObject/ArrayFuncCallToMethodCall.php
index 53c9734c..dd79d65c 100644
--- a/src/ValueObject/ArrayFuncCallToMethodCall.php
+++ b/src/ValueObject/ArrayFuncCallToMethodCall.php
@@ -9,18 +9,42 @@
final class ArrayFuncCallToMethodCall implements ArgumentFuncCallToMethodCallInterface
{
+ /**
+ * @var non-empty-string
+ * @readonly
+ */
+ private $function;
+
+ /**
+ * @var non-empty-string
+ * @readonly
+ */
+ private $class;
+
+ /**
+ * @var non-empty-string
+ * @readonly
+ */
+ private $arrayMethod;
+
+ /**
+ * @var non-empty-string
+ * @readonly
+ */
+ private $nonArrayMethod;
+
/**
* @param non-empty-string $function
* @param non-empty-string $class
* @param non-empty-string $arrayMethod
* @param non-empty-string $nonArrayMethod
*/
- public function __construct(
- private readonly string $function,
- private readonly string $class,
- private readonly string $arrayMethod,
- private readonly string $nonArrayMethod
- ) {
+ public function __construct(string $function, string $class, string $arrayMethod, string $nonArrayMethod)
+ {
+ $this->function = $function;
+ $this->class = $class;
+ $this->arrayMethod = $arrayMethod;
+ $this->nonArrayMethod = $nonArrayMethod;
RectorAssert::className($class);
RectorAssert::functionName($function);
RectorAssert::methodName($arrayMethod);
diff --git a/src/ValueObject/ServiceNameTypeAndVariableName.php b/src/ValueObject/ServiceNameTypeAndVariableName.php
index ca8a4c3e..719a0aa6 100644
--- a/src/ValueObject/ServiceNameTypeAndVariableName.php
+++ b/src/ValueObject/ServiceNameTypeAndVariableName.php
@@ -6,11 +6,29 @@
final class ServiceNameTypeAndVariableName
{
- public function __construct(
- private readonly string $serviceName,
- private readonly string $type,
- private readonly string $variableName
- ) {
+ /**
+ * @readonly
+ * @var string
+ */
+ private $serviceName;
+
+ /**
+ * @readonly
+ * @var string
+ */
+ private $type;
+
+ /**
+ * @readonly
+ * @var string
+ */
+ private $variableName;
+
+ public function __construct(string $serviceName, string $type, string $variableName)
+ {
+ $this->serviceName = $serviceName;
+ $this->type = $type;
+ $this->variableName = $variableName;
}
public function getServiceName(): string
diff --git a/src/ValueObject/TypeToTimeMethodAndPosition.php b/src/ValueObject/TypeToTimeMethodAndPosition.php
index 83b9d5d3..93520f95 100644
--- a/src/ValueObject/TypeToTimeMethodAndPosition.php
+++ b/src/ValueObject/TypeToTimeMethodAndPosition.php
@@ -8,11 +8,29 @@
final class TypeToTimeMethodAndPosition
{
- public function __construct(
- private readonly string $type,
- private readonly string $methodName,
- private readonly int $position
- ) {
+ /**
+ * @readonly
+ * @var string
+ */
+ private $type;
+
+ /**
+ * @readonly
+ * @var string
+ */
+ private $methodName;
+
+ /**
+ * @readonly
+ * @var int
+ */
+ private $position;
+
+ public function __construct(string $type, string $methodName, int $position)
+ {
+ $this->type = $type;
+ $this->methodName = $methodName;
+ $this->position = $position;
}
public function getObjectType(): ObjectType
diff --git a/stubs/Carbon/Carbon.php b/stubs/Carbon/Carbon.php
deleted file mode 100644
index 71c0e2bc..00000000
--- a/stubs/Carbon/Carbon.php
+++ /dev/null
@@ -1,29 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/Assign/CallOnAppArrayAccessToStandaloneAssignRector/Fixture/some_fixture.php.inc b/tests/Rector/Assign/CallOnAppArrayAccessToStandaloneAssignRector/Fixture/some_fixture.php.inc
deleted file mode 100644
index 5f0f7254..00000000
--- a/tests/Rector/Assign/CallOnAppArrayAccessToStandaloneAssignRector/Fixture/some_fixture.php.inc
+++ /dev/null
@@ -1,46 +0,0 @@
-app['validator']->make('...');
- }
-}
-
-?>
------
-app['validator'];
- $validator = $validationFactory->make('...');
- }
-}
-
-?>
diff --git a/tests/Rector/Assign/CallOnAppArrayAccessToStandaloneAssignRector/config/configured_rule.php b/tests/Rector/Assign/CallOnAppArrayAccessToStandaloneAssignRector/config/configured_rule.php
deleted file mode 100644
index a838c7e5..00000000
--- a/tests/Rector/Assign/CallOnAppArrayAccessToStandaloneAssignRector/config/configured_rule.php
+++ /dev/null
@@ -1,13 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
-
- $rectorConfig->rule(CallOnAppArrayAccessToStandaloneAssignRector::class);
-};
diff --git a/tests/Rector/Cast/DatabaseExpressionCastsToMethodCallRector/DatabaseExpressionCastsToMethodCallRectorTest.php b/tests/Rector/Cast/DatabaseExpressionCastsToMethodCallRector/DatabaseExpressionCastsToMethodCallRectorTest.php
deleted file mode 100644
index 2d108b9a..00000000
--- a/tests/Rector/Cast/DatabaseExpressionCastsToMethodCallRector/DatabaseExpressionCastsToMethodCallRectorTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/Cast/DatabaseExpressionCastsToMethodCallRector/Fixture/fixture.php.inc b/tests/Rector/Cast/DatabaseExpressionCastsToMethodCallRector/Fixture/fixture.php.inc
deleted file mode 100644
index ffbcdc69..00000000
--- a/tests/Rector/Cast/DatabaseExpressionCastsToMethodCallRector/Fixture/fixture.php.inc
+++ /dev/null
@@ -1,19 +0,0 @@
-
------
-getValue(\Illuminate\Support\Facades\DB::connection()->getQueryGrammar());
-
-?>
diff --git a/tests/Rector/Cast/DatabaseExpressionCastsToMethodCallRector/Fixture/skip_other_usages.php.inc b/tests/Rector/Cast/DatabaseExpressionCastsToMethodCallRector/Fixture/skip_other_usages.php.inc
deleted file mode 100644
index 811cbd07..00000000
--- a/tests/Rector/Cast/DatabaseExpressionCastsToMethodCallRector/Fixture/skip_other_usages.php.inc
+++ /dev/null
@@ -1,9 +0,0 @@
-where('name', DB::raw('select 1'))->get();
-
-?>
diff --git a/tests/Rector/Cast/DatabaseExpressionCastsToMethodCallRector/config/configured_rule.php b/tests/Rector/Cast/DatabaseExpressionCastsToMethodCallRector/config/configured_rule.php
deleted file mode 100644
index 7b684658..00000000
--- a/tests/Rector/Cast/DatabaseExpressionCastsToMethodCallRector/config/configured_rule.php
+++ /dev/null
@@ -1,12 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
-
- $rectorConfig->rule(DatabaseExpressionCastsToMethodCallRector::class);
-};
diff --git a/tests/Rector/ClassMethod/AddArgumentDefaultValueRector/AddArgumentDefaultValueRectorTest.php b/tests/Rector/ClassMethod/AddArgumentDefaultValueRector/AddArgumentDefaultValueRectorTest.php
deleted file mode 100644
index 003c0b2b..00000000
--- a/tests/Rector/ClassMethod/AddArgumentDefaultValueRector/AddArgumentDefaultValueRectorTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/ClassMethod/AddArgumentDefaultValueRector/Fixture/fixture.php.inc b/tests/Rector/ClassMethod/AddArgumentDefaultValueRector/Fixture/fixture.php.inc
deleted file mode 100644
index e7a487bc..00000000
--- a/tests/Rector/ClassMethod/AddArgumentDefaultValueRector/Fixture/fixture.php.inc
+++ /dev/null
@@ -1,31 +0,0 @@
-
------
-
diff --git a/tests/Rector/ClassMethod/AddArgumentDefaultValueRector/Fixture/fixture2.php.inc b/tests/Rector/ClassMethod/AddArgumentDefaultValueRector/Fixture/fixture2.php.inc
deleted file mode 100644
index f5d062cf..00000000
--- a/tests/Rector/ClassMethod/AddArgumentDefaultValueRector/Fixture/fixture2.php.inc
+++ /dev/null
@@ -1,31 +0,0 @@
-
------
-
diff --git a/tests/Rector/ClassMethod/AddArgumentDefaultValueRector/config/configured_rule.php b/tests/Rector/ClassMethod/AddArgumentDefaultValueRector/config/configured_rule.php
deleted file mode 100644
index b4befadc..00000000
--- a/tests/Rector/ClassMethod/AddArgumentDefaultValueRector/config/configured_rule.php
+++ /dev/null
@@ -1,15 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
-
- $rectorConfig->ruleWithConfiguration(AddArgumentDefaultValueRector::class, [
- new AddArgumentDefaultValue('Illuminate\Contracts\Events\Dispatcher', 'listen', 1, null),
- ]);
-};
diff --git a/tests/Rector/ClassMethod/AddGenericReturnTypeToRelationsRector/AddGenericReturnTypeToRelationsRectorTest.php b/tests/Rector/ClassMethod/AddGenericReturnTypeToRelationsRector/AddGenericReturnTypeToRelationsRectorTest.php
deleted file mode 100644
index 3eab5fd7..00000000
--- a/tests/Rector/ClassMethod/AddGenericReturnTypeToRelationsRector/AddGenericReturnTypeToRelationsRectorTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/ClassMethod/AddGenericReturnTypeToRelationsRector/Fixture/empty-phpdoc.php.inc b/tests/Rector/ClassMethod/AddGenericReturnTypeToRelationsRector/Fixture/empty-phpdoc.php.inc
deleted file mode 100644
index a3c29254..00000000
--- a/tests/Rector/ClassMethod/AddGenericReturnTypeToRelationsRector/Fixture/empty-phpdoc.php.inc
+++ /dev/null
@@ -1,42 +0,0 @@
-hasMany(Account::class);
- }
-}
-
-?>
------
-
- */
- public function accounts(): HasMany
- {
- return $this->hasMany(Account::class);
- }
-}
-
-?>
diff --git a/tests/Rector/ClassMethod/AddGenericReturnTypeToRelationsRector/Fixture/no-phpdoc.php.inc b/tests/Rector/ClassMethod/AddGenericReturnTypeToRelationsRector/Fixture/no-phpdoc.php.inc
deleted file mode 100644
index ffa906d4..00000000
--- a/tests/Rector/ClassMethod/AddGenericReturnTypeToRelationsRector/Fixture/no-phpdoc.php.inc
+++ /dev/null
@@ -1,40 +0,0 @@
-hasMany(Account::class);
- }
-}
-
-?>
------
-
- */
- public function accounts(): HasMany
- {
- return $this->hasMany(Account::class);
- }
-}
-
-?>
diff --git a/tests/Rector/ClassMethod/AddGenericReturnTypeToRelationsRector/Fixture/phpdoc-with-existing-return.php.inc b/tests/Rector/ClassMethod/AddGenericReturnTypeToRelationsRector/Fixture/phpdoc-with-existing-return.php.inc
deleted file mode 100644
index 9e5112c4..00000000
--- a/tests/Rector/ClassMethod/AddGenericReturnTypeToRelationsRector/Fixture/phpdoc-with-existing-return.php.inc
+++ /dev/null
@@ -1,43 +0,0 @@
-hasMany(Account::class);
- }
-}
-
-?>
------
-hasMany(Account::class);
- }
-}
-
-?>
diff --git a/tests/Rector/ClassMethod/AddGenericReturnTypeToRelationsRector/Fixture/phpdoc-with-supported-return.php.inc b/tests/Rector/ClassMethod/AddGenericReturnTypeToRelationsRector/Fixture/phpdoc-with-supported-return.php.inc
deleted file mode 100644
index 0d3294f5..00000000
--- a/tests/Rector/ClassMethod/AddGenericReturnTypeToRelationsRector/Fixture/phpdoc-with-supported-return.php.inc
+++ /dev/null
@@ -1,43 +0,0 @@
-hasMany(Account::class);
- }
-}
-
-?>
------
-
- */
- public function accounts(): HasMany
- {
- return $this->hasMany(Account::class);
- }
-}
-
-?>
diff --git a/tests/Rector/ClassMethod/AddGenericReturnTypeToRelationsRector/Fixture/phpdoc-without-return.php.inc b/tests/Rector/ClassMethod/AddGenericReturnTypeToRelationsRector/Fixture/phpdoc-without-return.php.inc
deleted file mode 100644
index 8a145a57..00000000
--- a/tests/Rector/ClassMethod/AddGenericReturnTypeToRelationsRector/Fixture/phpdoc-without-return.php.inc
+++ /dev/null
@@ -1,44 +0,0 @@
-hasMany(Account::class);
- }
-}
-
-?>
------
-
- */
- public function accounts(): HasMany
- {
- return $this->hasMany(Account::class);
- }
-}
-
-?>
diff --git a/tests/Rector/ClassMethod/AddGenericReturnTypeToRelationsRector/Fixture/relation-in-trait.php.inc b/tests/Rector/ClassMethod/AddGenericReturnTypeToRelationsRector/Fixture/relation-in-trait.php.inc
deleted file mode 100644
index 5e5e0ffa..00000000
--- a/tests/Rector/ClassMethod/AddGenericReturnTypeToRelationsRector/Fixture/relation-in-trait.php.inc
+++ /dev/null
@@ -1,50 +0,0 @@
-hasMany(Account::class);
- }
-}
-
-class User extends Model
-{
- use AccountTrait;
-}
-
-?>
------
-
- */
- public function accounts(): HasMany
- {
- return $this->hasMany(Account::class);
- }
-}
-
-class User extends Model
-{
- use AccountTrait;
-}
-
-?>
diff --git a/tests/Rector/ClassMethod/AddGenericReturnTypeToRelationsRector/Fixture/relation-with-child-generics.php.inc b/tests/Rector/ClassMethod/AddGenericReturnTypeToRelationsRector/Fixture/relation-with-child-generics.php.inc
deleted file mode 100644
index 3069de72..00000000
--- a/tests/Rector/ClassMethod/AddGenericReturnTypeToRelationsRector/Fixture/relation-with-child-generics.php.inc
+++ /dev/null
@@ -1,40 +0,0 @@
-belongsTo(Account::class);
- }
-}
-
-?>
------
-
- */
- public function accounts(): BelongsTo
- {
- return $this->belongsTo(Account::class);
- }
-}
-
-?>
diff --git a/tests/Rector/ClassMethod/AddGenericReturnTypeToRelationsRector/Fixture/relation-with-existing-child-generic.php.inc b/tests/Rector/ClassMethod/AddGenericReturnTypeToRelationsRector/Fixture/relation-with-existing-child-generic.php.inc
deleted file mode 100644
index e44dd060..00000000
--- a/tests/Rector/ClassMethod/AddGenericReturnTypeToRelationsRector/Fixture/relation-with-existing-child-generic.php.inc
+++ /dev/null
@@ -1,43 +0,0 @@
-
- */
- public function accounts(): BelongsTo
- {
- return $this->belongsTo(Account::class);
- }
-}
-
-?>
------
-
- */
- public function accounts(): BelongsTo
- {
- return $this->belongsTo(Account::class);
- }
-}
-
-?>
diff --git a/tests/Rector/ClassMethod/AddGenericReturnTypeToRelationsRector/Fixture/relation-without-return-type.php.inc b/tests/Rector/ClassMethod/AddGenericReturnTypeToRelationsRector/Fixture/relation-without-return-type.php.inc
deleted file mode 100644
index 9b7a1ccb..00000000
--- a/tests/Rector/ClassMethod/AddGenericReturnTypeToRelationsRector/Fixture/relation-without-return-type.php.inc
+++ /dev/null
@@ -1,37 +0,0 @@
-hasMany(Account::class);
- }
-}
-
-?>
------
-hasMany(Account::class);
- }
-}
-
-?>
diff --git a/tests/Rector/ClassMethod/AddGenericReturnTypeToRelationsRector/config/configured_rule.php b/tests/Rector/ClassMethod/AddGenericReturnTypeToRelationsRector/config/configured_rule.php
deleted file mode 100644
index db746339..00000000
--- a/tests/Rector/ClassMethod/AddGenericReturnTypeToRelationsRector/config/configured_rule.php
+++ /dev/null
@@ -1,13 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
-
- $rectorConfig->rule(AddGenericReturnTypeToRelationsRector::class);
-};
diff --git a/tests/Rector/ClassMethod/AddParentBootToModelClassMethodRector/AddParentBootToModelClassMethodRectorTest.php b/tests/Rector/ClassMethod/AddParentBootToModelClassMethodRector/AddParentBootToModelClassMethodRectorTest.php
deleted file mode 100644
index f4cd2580..00000000
--- a/tests/Rector/ClassMethod/AddParentBootToModelClassMethodRector/AddParentBootToModelClassMethodRectorTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/ClassMethod/AddParentBootToModelClassMethodRector/Fixture/fixture.php.inc b/tests/Rector/ClassMethod/AddParentBootToModelClassMethodRector/Fixture/fixture.php.inc
deleted file mode 100644
index c9d237bc..00000000
--- a/tests/Rector/ClassMethod/AddParentBootToModelClassMethodRector/Fixture/fixture.php.inc
+++ /dev/null
@@ -1,30 +0,0 @@
-
------
-
diff --git a/tests/Rector/ClassMethod/AddParentBootToModelClassMethodRector/Fixture/on_the_last_line.php.inc b/tests/Rector/ClassMethod/AddParentBootToModelClassMethodRector/Fixture/on_the_last_line.php.inc
deleted file mode 100644
index 4a10668c..00000000
--- a/tests/Rector/ClassMethod/AddParentBootToModelClassMethodRector/Fixture/on_the_last_line.php.inc
+++ /dev/null
@@ -1,33 +0,0 @@
-
------
-
diff --git a/tests/Rector/ClassMethod/AddParentBootToModelClassMethodRector/config/configured_rule.php b/tests/Rector/ClassMethod/AddParentBootToModelClassMethodRector/config/configured_rule.php
deleted file mode 100644
index 5f7dd24e..00000000
--- a/tests/Rector/ClassMethod/AddParentBootToModelClassMethodRector/config/configured_rule.php
+++ /dev/null
@@ -1,13 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
-
- $rectorConfig->rule(AddParentBootToModelClassMethodRector::class);
-};
diff --git a/tests/Rector/ClassMethod/AddParentRegisterToEventServiceProviderRector/AddParentRegisterToEventServiceProviderRectorTest.php b/tests/Rector/ClassMethod/AddParentRegisterToEventServiceProviderRector/AddParentRegisterToEventServiceProviderRectorTest.php
deleted file mode 100644
index a7c57abf..00000000
--- a/tests/Rector/ClassMethod/AddParentRegisterToEventServiceProviderRector/AddParentRegisterToEventServiceProviderRectorTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/ClassMethod/AddParentRegisterToEventServiceProviderRector/Fixture/fixture.php.inc b/tests/Rector/ClassMethod/AddParentRegisterToEventServiceProviderRector/Fixture/fixture.php.inc
deleted file mode 100644
index eee28d2a..00000000
--- a/tests/Rector/ClassMethod/AddParentRegisterToEventServiceProviderRector/Fixture/fixture.php.inc
+++ /dev/null
@@ -1,30 +0,0 @@
-
------
-
diff --git a/tests/Rector/ClassMethod/AddParentRegisterToEventServiceProviderRector/Fixture/on_the_last_line.php.inc b/tests/Rector/ClassMethod/AddParentRegisterToEventServiceProviderRector/Fixture/on_the_last_line.php.inc
deleted file mode 100644
index ce1e78e9..00000000
--- a/tests/Rector/ClassMethod/AddParentRegisterToEventServiceProviderRector/Fixture/on_the_last_line.php.inc
+++ /dev/null
@@ -1,33 +0,0 @@
-
------
-
diff --git a/tests/Rector/ClassMethod/AddParentRegisterToEventServiceProviderRector/config/configured_rule.php b/tests/Rector/ClassMethod/AddParentRegisterToEventServiceProviderRector/config/configured_rule.php
deleted file mode 100644
index e790bc0d..00000000
--- a/tests/Rector/ClassMethod/AddParentRegisterToEventServiceProviderRector/config/configured_rule.php
+++ /dev/null
@@ -1,13 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
-
- $rectorConfig->rule(AddParentRegisterToEventServiceProviderRector::class);
-};
diff --git a/tests/Rector/ClassMethod/MigrateToSimplifiedAttributeRector/Fixture/migrate-accessors-with-value-parameter.php.inc b/tests/Rector/ClassMethod/MigrateToSimplifiedAttributeRector/Fixture/migrate-accessors-with-value-parameter.php.inc
deleted file mode 100644
index c602020a..00000000
--- a/tests/Rector/ClassMethod/MigrateToSimplifiedAttributeRector/Fixture/migrate-accessors-with-value-parameter.php.inc
+++ /dev/null
@@ -1,31 +0,0 @@
-
------
-
diff --git a/tests/Rector/ClassMethod/MigrateToSimplifiedAttributeRector/Fixture/migrate-accessors-without-value-parameter.php.inc b/tests/Rector/ClassMethod/MigrateToSimplifiedAttributeRector/Fixture/migrate-accessors-without-value-parameter.php.inc
deleted file mode 100644
index 7ea407de..00000000
--- a/tests/Rector/ClassMethod/MigrateToSimplifiedAttributeRector/Fixture/migrate-accessors-without-value-parameter.php.inc
+++ /dev/null
@@ -1,21 +0,0 @@
-first_name);
- }
-}
-?>
------
-first_name);
- });
- }
-}
-?>
\ No newline at end of file
diff --git a/tests/Rector/ClassMethod/MigrateToSimplifiedAttributeRector/Fixture/migrate-and-preserve-doc-blocks.php.inc b/tests/Rector/ClassMethod/MigrateToSimplifiedAttributeRector/Fixture/migrate-and-preserve-doc-blocks.php.inc
deleted file mode 100644
index 92d5f3f6..00000000
--- a/tests/Rector/ClassMethod/MigrateToSimplifiedAttributeRector/Fixture/migrate-and-preserve-doc-blocks.php.inc
+++ /dev/null
@@ -1,33 +0,0 @@
-first_name);
- }
-}
-?>
------
-first_name);
- });
- }
-}
-?>
diff --git a/tests/Rector/ClassMethod/MigrateToSimplifiedAttributeRector/Fixture/migrate-multiple-mutators.php.inc b/tests/Rector/ClassMethod/MigrateToSimplifiedAttributeRector/Fixture/migrate-multiple-mutators.php.inc
deleted file mode 100644
index 065d3918..00000000
--- a/tests/Rector/ClassMethod/MigrateToSimplifiedAttributeRector/Fixture/migrate-multiple-mutators.php.inc
+++ /dev/null
@@ -1,42 +0,0 @@
-test = 'asdf';
- $this->attributes['first_name'] = strtolower($value);
- $this->attributes['first_name_upper'] = strtoupper($value);
- }
-}
-?>
------
-test = 'asdf';
- return ['first_name' => strtolower($value), 'first_name_upper' => strtoupper($value)];
- });
- }
-}
-?>
diff --git a/tests/Rector/ClassMethod/MigrateToSimplifiedAttributeRector/Fixture/migrate-mutators-and-accessors-in-the-same-method.php.inc b/tests/Rector/ClassMethod/MigrateToSimplifiedAttributeRector/Fixture/migrate-mutators-and-accessors-in-the-same-method.php.inc
deleted file mode 100644
index 21ee9257..00000000
--- a/tests/Rector/ClassMethod/MigrateToSimplifiedAttributeRector/Fixture/migrate-mutators-and-accessors-in-the-same-method.php.inc
+++ /dev/null
@@ -1,39 +0,0 @@
-attributes['first_name'] = strtolower($value);
- $this->attributes['first_name_upper'] = strtoupper($value);
- }
-}
-?>
------
- strtolower($value), 'first_name_upper' => strtoupper($value)];
- });
- }
-}
-?>
diff --git a/tests/Rector/ClassMethod/MigrateToSimplifiedAttributeRector/Fixture/migrate-mutators.php.inc b/tests/Rector/ClassMethod/MigrateToSimplifiedAttributeRector/Fixture/migrate-mutators.php.inc
deleted file mode 100644
index 2e235e36..00000000
--- a/tests/Rector/ClassMethod/MigrateToSimplifiedAttributeRector/Fixture/migrate-mutators.php.inc
+++ /dev/null
@@ -1,37 +0,0 @@
-attributes['first_name'] = strtolower($value);
- }
-}
-?>
------
- strtolower($value)];
- });
- }
-}
-?>
diff --git a/tests/Rector/ClassMethod/MigrateToSimplifiedAttributeRector/Fixture/skip-classes-that-are-not-eloquent-models.php.inc b/tests/Rector/ClassMethod/MigrateToSimplifiedAttributeRector/Fixture/skip-classes-that-are-not-eloquent-models.php.inc
deleted file mode 100644
index ff5290bb..00000000
--- a/tests/Rector/ClassMethod/MigrateToSimplifiedAttributeRector/Fixture/skip-classes-that-are-not-eloquent-models.php.inc
+++ /dev/null
@@ -1,11 +0,0 @@
-
diff --git a/tests/Rector/ClassMethod/MigrateToSimplifiedAttributeRector/Fixture/skip-classes-that-have-no-parents.php.inc b/tests/Rector/ClassMethod/MigrateToSimplifiedAttributeRector/Fixture/skip-classes-that-have-no-parents.php.inc
deleted file mode 100644
index 2e5325e9..00000000
--- a/tests/Rector/ClassMethod/MigrateToSimplifiedAttributeRector/Fixture/skip-classes-that-have-no-parents.php.inc
+++ /dev/null
@@ -1,8 +0,0 @@
-
diff --git a/tests/Rector/ClassMethod/MigrateToSimplifiedAttributeRector/MigrateToSimplifiedAttributeRectorTest.php b/tests/Rector/ClassMethod/MigrateToSimplifiedAttributeRector/MigrateToSimplifiedAttributeRectorTest.php
deleted file mode 100644
index fcef320c..00000000
--- a/tests/Rector/ClassMethod/MigrateToSimplifiedAttributeRector/MigrateToSimplifiedAttributeRectorTest.php
+++ /dev/null
@@ -1,31 +0,0 @@
-doTestFile($filePath);
- }
-
- /**
- * @return Iterator
- */
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/ClassMethod/MigrateToSimplifiedAttributeRector/config/configured_rule.php b/tests/Rector/ClassMethod/MigrateToSimplifiedAttributeRector/config/configured_rule.php
deleted file mode 100644
index 2601381a..00000000
--- a/tests/Rector/ClassMethod/MigrateToSimplifiedAttributeRector/config/configured_rule.php
+++ /dev/null
@@ -1,12 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
-
- $rectorConfig->rule(MigrateToSimplifiedAttributeRector::class);
-};
diff --git a/tests/Rector/Class_/AddExtendsAnnotationToModelFactoriesRector/AddExtendsAnnotationToModelFactoriesRectorTest.php b/tests/Rector/Class_/AddExtendsAnnotationToModelFactoriesRector/AddExtendsAnnotationToModelFactoriesRectorTest.php
deleted file mode 100644
index 03be9229..00000000
--- a/tests/Rector/Class_/AddExtendsAnnotationToModelFactoriesRector/AddExtendsAnnotationToModelFactoriesRectorTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/Class_/AddExtendsAnnotationToModelFactoriesRector/Fixture/fixture.php.inc b/tests/Rector/Class_/AddExtendsAnnotationToModelFactoriesRector/Fixture/fixture.php.inc
deleted file mode 100644
index 129bd4d2..00000000
--- a/tests/Rector/Class_/AddExtendsAnnotationToModelFactoriesRector/Fixture/fixture.php.inc
+++ /dev/null
@@ -1,28 +0,0 @@
-
------
-
- */
-class UserFactory extends Factory
-{
- protected $model = \App\Models\User::class;
-}
-
-?>
diff --git a/tests/Rector/Class_/AddExtendsAnnotationToModelFactoriesRector/Fixture/skip_existing_extends_tag.php.inc b/tests/Rector/Class_/AddExtendsAnnotationToModelFactoriesRector/Fixture/skip_existing_extends_tag.php.inc
deleted file mode 100644
index 230c16ba..00000000
--- a/tests/Rector/Class_/AddExtendsAnnotationToModelFactoriesRector/Fixture/skip_existing_extends_tag.php.inc
+++ /dev/null
@@ -1,15 +0,0 @@
-
- */
-class UserFactory extends Factory
-{
- protected $model = \App\Models\User::class;
-}
-
-?>
diff --git a/tests/Rector/Class_/AddExtendsAnnotationToModelFactoriesRector/Fixture/using_class_string_as_model_type.php.inc b/tests/Rector/Class_/AddExtendsAnnotationToModelFactoriesRector/Fixture/using_class_string_as_model_type.php.inc
deleted file mode 100644
index 996e194c..00000000
--- a/tests/Rector/Class_/AddExtendsAnnotationToModelFactoriesRector/Fixture/using_class_string_as_model_type.php.inc
+++ /dev/null
@@ -1,28 +0,0 @@
-
------
-
- */
-class UserFactory extends Factory
-{
- protected $model = 'App\Models\User';
-}
-
-?>
diff --git a/tests/Rector/Class_/AddExtendsAnnotationToModelFactoriesRector/config/configured_rule.php b/tests/Rector/Class_/AddExtendsAnnotationToModelFactoriesRector/config/configured_rule.php
deleted file mode 100644
index 5208b5c2..00000000
--- a/tests/Rector/Class_/AddExtendsAnnotationToModelFactoriesRector/config/configured_rule.php
+++ /dev/null
@@ -1,13 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
-
- $rectorConfig->rule(AddExtendsAnnotationToModelFactoriesRector::class);
-};
diff --git a/tests/Rector/Class_/AddMockConsoleOutputFalseToConsoleTestsRector/AddMockConsoleOutputFalseToConsoleTestsRectorTest.php b/tests/Rector/Class_/AddMockConsoleOutputFalseToConsoleTestsRector/AddMockConsoleOutputFalseToConsoleTestsRectorTest.php
deleted file mode 100644
index 3da07d4f..00000000
--- a/tests/Rector/Class_/AddMockConsoleOutputFalseToConsoleTestsRector/AddMockConsoleOutputFalseToConsoleTestsRectorTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/Class_/AddMockConsoleOutputFalseToConsoleTestsRector/Fixture/existing_set_up.php.inc b/tests/Rector/Class_/AddMockConsoleOutputFalseToConsoleTestsRector/Fixture/existing_set_up.php.inc
deleted file mode 100644
index ef56deee..00000000
--- a/tests/Rector/Class_/AddMockConsoleOutputFalseToConsoleTestsRector/Fixture/existing_set_up.php.inc
+++ /dev/null
@@ -1,44 +0,0 @@
-assertEquals('content', \trim(Artisan::output()));
- }
-}
-
-?>
------
-mockConsoleOutput = false;
- }
-
- public function test(): void
- {
- $this->assertEquals('content', \trim(Artisan::output()));
- }
-}
-
-?>
diff --git a/tests/Rector/Class_/AddMockConsoleOutputFalseToConsoleTestsRector/Fixture/fixture.php.inc b/tests/Rector/Class_/AddMockConsoleOutputFalseToConsoleTestsRector/Fixture/fixture.php.inc
deleted file mode 100644
index 81be8f20..00000000
--- a/tests/Rector/Class_/AddMockConsoleOutputFalseToConsoleTestsRector/Fixture/fixture.php.inc
+++ /dev/null
@@ -1,38 +0,0 @@
-assertEquals('content', \trim(Artisan::output()));
- }
-}
-
-?>
------
-mockConsoleOutput = false;
- }
- public function test(): void
- {
- $this->assertEquals('content', \trim(Artisan::output()));
- }
-}
-
-?>
diff --git a/tests/Rector/Class_/AddMockConsoleOutputFalseToConsoleTestsRector/Fixture/new_artisan.php.inc b/tests/Rector/Class_/AddMockConsoleOutputFalseToConsoleTestsRector/Fixture/new_artisan.php.inc
deleted file mode 100644
index ca7b9915..00000000
--- a/tests/Rector/Class_/AddMockConsoleOutputFalseToConsoleTestsRector/Fixture/new_artisan.php.inc
+++ /dev/null
@@ -1,38 +0,0 @@
-assertEquals('content', \trim((new Artisan())::output()));
- }
-}
-
-?>
------
-mockConsoleOutput = false;
- }
- public function test(): void
- {
- $this->assertEquals('content', \trim((new Artisan())::output()));
- }
-}
-
-?>
diff --git a/tests/Rector/Class_/AddMockConsoleOutputFalseToConsoleTestsRector/Fixture/skip_already_set.php.inc b/tests/Rector/Class_/AddMockConsoleOutputFalseToConsoleTestsRector/Fixture/skip_already_set.php.inc
deleted file mode 100644
index 2069d659..00000000
--- a/tests/Rector/Class_/AddMockConsoleOutputFalseToConsoleTestsRector/Fixture/skip_already_set.php.inc
+++ /dev/null
@@ -1,20 +0,0 @@
-mockConsoleOutput = false;
- }
-
- public function test(): void
- {
- $this->assertEquals('content', \trim(Artisan::output()));
- }
-}
diff --git a/tests/Rector/Class_/AddMockConsoleOutputFalseToConsoleTestsRector/config/configured_rule.php b/tests/Rector/Class_/AddMockConsoleOutputFalseToConsoleTestsRector/config/configured_rule.php
deleted file mode 100644
index d524d808..00000000
--- a/tests/Rector/Class_/AddMockConsoleOutputFalseToConsoleTestsRector/config/configured_rule.php
+++ /dev/null
@@ -1,13 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
-
- $rectorConfig->rule(AddMockConsoleOutputFalseToConsoleTestsRector::class);
-};
diff --git a/tests/Rector/Class_/AnonymousMigrationsRector/AnonymousMigrationsRectorTest.php b/tests/Rector/Class_/AnonymousMigrationsRector/AnonymousMigrationsRectorTest.php
deleted file mode 100644
index 2f1eb6b7..00000000
--- a/tests/Rector/Class_/AnonymousMigrationsRector/AnonymousMigrationsRectorTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/Class_/AnonymousMigrationsRector/Fixture/fixture.php.inc b/tests/Rector/Class_/AnonymousMigrationsRector/Fixture/fixture.php.inc
deleted file mode 100644
index 8b4d6952..00000000
--- a/tests/Rector/Class_/AnonymousMigrationsRector/Fixture/fixture.php.inc
+++ /dev/null
@@ -1,25 +0,0 @@
-
------
-
diff --git a/tests/Rector/Class_/AnonymousMigrationsRector/Fixture/skip_abstract_migration.php.inc b/tests/Rector/Class_/AnonymousMigrationsRector/Fixture/skip_abstract_migration.php.inc
deleted file mode 100644
index 35ccd96c..00000000
--- a/tests/Rector/Class_/AnonymousMigrationsRector/Fixture/skip_abstract_migration.php.inc
+++ /dev/null
@@ -1,10 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
-
- $rectorConfig->rule(AnonymousMigrationsRector::class);
-};
diff --git a/tests/Rector/Class_/CashierStripeOptionsToStripeRector/CashierStripeOptionsToStripeRectorTest.php b/tests/Rector/Class_/CashierStripeOptionsToStripeRector/CashierStripeOptionsToStripeRectorTest.php
deleted file mode 100644
index 0d1e49cf..00000000
--- a/tests/Rector/Class_/CashierStripeOptionsToStripeRector/CashierStripeOptionsToStripeRectorTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/Class_/CashierStripeOptionsToStripeRector/Fixture/fixture.php.inc b/tests/Rector/Class_/CashierStripeOptionsToStripeRector/Fixture/fixture.php.inc
deleted file mode 100644
index e2116cc1..00000000
--- a/tests/Rector/Class_/CashierStripeOptionsToStripeRector/Fixture/fixture.php.inc
+++ /dev/null
@@ -1,29 +0,0 @@
-
------
-
diff --git a/tests/Rector/Class_/CashierStripeOptionsToStripeRector/Source/User.php b/tests/Rector/Class_/CashierStripeOptionsToStripeRector/Source/User.php
deleted file mode 100644
index 82da7de3..00000000
--- a/tests/Rector/Class_/CashierStripeOptionsToStripeRector/Source/User.php
+++ /dev/null
@@ -1,11 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
-
- $rectorConfig->rule(CashierStripeOptionsToStripeRector::class);
-};
diff --git a/tests/Rector/Class_/PropertyDeferToDeferrableProviderToRector/Fixture/fixture.php.inc b/tests/Rector/Class_/PropertyDeferToDeferrableProviderToRector/Fixture/fixture.php.inc
deleted file mode 100644
index cfc54a3e..00000000
--- a/tests/Rector/Class_/PropertyDeferToDeferrableProviderToRector/Fixture/fixture.php.inc
+++ /dev/null
@@ -1,27 +0,0 @@
-
------
-
diff --git a/tests/Rector/Class_/PropertyDeferToDeferrableProviderToRector/Fixture/skip_false_defer.php.inc b/tests/Rector/Class_/PropertyDeferToDeferrableProviderToRector/Fixture/skip_false_defer.php.inc
deleted file mode 100644
index 8d9351af..00000000
--- a/tests/Rector/Class_/PropertyDeferToDeferrableProviderToRector/Fixture/skip_false_defer.php.inc
+++ /dev/null
@@ -1,13 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/Class_/PropertyDeferToDeferrableProviderToRector/config/configured_rule.php b/tests/Rector/Class_/PropertyDeferToDeferrableProviderToRector/config/configured_rule.php
deleted file mode 100644
index 468295ec..00000000
--- a/tests/Rector/Class_/PropertyDeferToDeferrableProviderToRector/config/configured_rule.php
+++ /dev/null
@@ -1,13 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
-
- $rectorConfig->rule(PropertyDeferToDeferrableProviderToRector::class);
-};
diff --git a/tests/Rector/Class_/RemoveModelPropertyFromFactoriesRector/Fixture/fixture.php.inc b/tests/Rector/Class_/RemoveModelPropertyFromFactoriesRector/Fixture/fixture.php.inc
deleted file mode 100644
index 8c0f8d5b..00000000
--- a/tests/Rector/Class_/RemoveModelPropertyFromFactoriesRector/Fixture/fixture.php.inc
+++ /dev/null
@@ -1,24 +0,0 @@
-
------
-
diff --git a/tests/Rector/Class_/RemoveModelPropertyFromFactoriesRector/RemoveModelPropertyFromFactoriesRectorTest.php b/tests/Rector/Class_/RemoveModelPropertyFromFactoriesRector/RemoveModelPropertyFromFactoriesRectorTest.php
deleted file mode 100644
index 8600366c..00000000
--- a/tests/Rector/Class_/RemoveModelPropertyFromFactoriesRector/RemoveModelPropertyFromFactoriesRectorTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/Class_/RemoveModelPropertyFromFactoriesRector/config/configured_rule.php b/tests/Rector/Class_/RemoveModelPropertyFromFactoriesRector/config/configured_rule.php
deleted file mode 100644
index d60363e2..00000000
--- a/tests/Rector/Class_/RemoveModelPropertyFromFactoriesRector/config/configured_rule.php
+++ /dev/null
@@ -1,13 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
-
- $rectorConfig->rule(RemoveModelPropertyFromFactoriesRector::class);
-};
diff --git a/tests/Rector/Class_/UnifyModelDatesWithCastsRector/Fixture/casts_property_not_exists.php.inc b/tests/Rector/Class_/UnifyModelDatesWithCastsRector/Fixture/casts_property_not_exists.php.inc
deleted file mode 100644
index ec98d0b8..00000000
--- a/tests/Rector/Class_/UnifyModelDatesWithCastsRector/Fixture/casts_property_not_exists.php.inc
+++ /dev/null
@@ -1,25 +0,0 @@
-
------
- 'datetime'];
-}
-
-?>
diff --git a/tests/Rector/Class_/UnifyModelDatesWithCastsRector/Fixture/dates_exists_in_casts.php.inc b/tests/Rector/Class_/UnifyModelDatesWithCastsRector/Fixture/dates_exists_in_casts.php.inc
deleted file mode 100644
index 8fdf6a1a..00000000
--- a/tests/Rector/Class_/UnifyModelDatesWithCastsRector/Fixture/dates_exists_in_casts.php.inc
+++ /dev/null
@@ -1,31 +0,0 @@
- 'date:Y-m',
- ];
-
- protected $dates = ['birthday'];
-}
-
-?>
------
- 'date:Y-m',
- ];
-}
-
-?>
diff --git a/tests/Rector/Class_/UnifyModelDatesWithCastsRector/Fixture/fixture.php.inc b/tests/Rector/Class_/UnifyModelDatesWithCastsRector/Fixture/fixture.php.inc
deleted file mode 100644
index 5c08fa03..00000000
--- a/tests/Rector/Class_/UnifyModelDatesWithCastsRector/Fixture/fixture.php.inc
+++ /dev/null
@@ -1,31 +0,0 @@
- 'integer',
- ];
-
- protected $dates = ['birthday', 'created_at'];
-}
-
-?>
------
- 'integer', 'birthday' => 'datetime', 'created_at' => 'datetime',
- ];
-}
-
-?>
diff --git a/tests/Rector/Class_/UnifyModelDatesWithCastsRector/UnifyModelDatesWithCastsRectorTest.php b/tests/Rector/Class_/UnifyModelDatesWithCastsRector/UnifyModelDatesWithCastsRectorTest.php
deleted file mode 100644
index 755607bb..00000000
--- a/tests/Rector/Class_/UnifyModelDatesWithCastsRector/UnifyModelDatesWithCastsRectorTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/Class_/UnifyModelDatesWithCastsRector/config/configured_rule.php b/tests/Rector/Class_/UnifyModelDatesWithCastsRector/config/configured_rule.php
deleted file mode 100644
index 9a3c7ca9..00000000
--- a/tests/Rector/Class_/UnifyModelDatesWithCastsRector/config/configured_rule.php
+++ /dev/null
@@ -1,13 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
-
- $rectorConfig->rule(UnifyModelDatesWithCastsRector::class);
-};
diff --git a/tests/Rector/Empty_/EmptyToBlankAndFilledFuncRector/EmptyToBlankAndFilledFuncRectorTest.php b/tests/Rector/Empty_/EmptyToBlankAndFilledFuncRector/EmptyToBlankAndFilledFuncRectorTest.php
deleted file mode 100644
index a6809230..00000000
--- a/tests/Rector/Empty_/EmptyToBlankAndFilledFuncRector/EmptyToBlankAndFilledFuncRectorTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/Empty_/EmptyToBlankAndFilledFuncRector/Fixture/fixture_with_empty.php.inc b/tests/Rector/Empty_/EmptyToBlankAndFilledFuncRector/Fixture/fixture_with_empty.php.inc
deleted file mode 100644
index 2a778563..00000000
--- a/tests/Rector/Empty_/EmptyToBlankAndFilledFuncRector/Fixture/fixture_with_empty.php.inc
+++ /dev/null
@@ -1,31 +0,0 @@
-
------
-
diff --git a/tests/Rector/Empty_/EmptyToBlankAndFilledFuncRector/Fixture/fixture_with_not_empty.php.inc b/tests/Rector/Empty_/EmptyToBlankAndFilledFuncRector/Fixture/fixture_with_not_empty.php.inc
deleted file mode 100644
index 63cd73ce..00000000
--- a/tests/Rector/Empty_/EmptyToBlankAndFilledFuncRector/Fixture/fixture_with_not_empty.php.inc
+++ /dev/null
@@ -1,31 +0,0 @@
-
------
-
diff --git a/tests/Rector/Empty_/EmptyToBlankAndFilledFuncRector/config/configured_rule.php b/tests/Rector/Empty_/EmptyToBlankAndFilledFuncRector/config/configured_rule.php
deleted file mode 100644
index 70249cc0..00000000
--- a/tests/Rector/Empty_/EmptyToBlankAndFilledFuncRector/config/configured_rule.php
+++ /dev/null
@@ -1,12 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
-
- $rectorConfig->rule(EmptyToBlankAndFilledFuncRector::class);
-};
diff --git a/tests/Rector/Expr/AppEnvironmentComparisonToParameterRector/AppEnvironmentComparisonToParameterRectorTest.php b/tests/Rector/Expr/AppEnvironmentComparisonToParameterRector/AppEnvironmentComparisonToParameterRectorTest.php
deleted file mode 100644
index 750700a0..00000000
--- a/tests/Rector/Expr/AppEnvironmentComparisonToParameterRector/AppEnvironmentComparisonToParameterRectorTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/Expr/AppEnvironmentComparisonToParameterRector/Fixture/fixture.php.inc b/tests/Rector/Expr/AppEnvironmentComparisonToParameterRector/Fixture/fixture.php.inc
deleted file mode 100644
index 93433a87..00000000
--- a/tests/Rector/Expr/AppEnvironmentComparisonToParameterRector/Fixture/fixture.php.inc
+++ /dev/null
@@ -1,31 +0,0 @@
-environment() === 'production';
-'staging' == $app->environment();
-
-if ($app->environment() === 'production') {
-}
-
-\Illuminate\Support\Facades\App::environment() === 'production';
-\App::environment() === 'production';
-
-?>
------
-environment('production');
-$app->environment('staging');
-
-if ($app->environment('production')) {
-}
-
-\Illuminate\Support\Facades\App::environment('production');
-\App::environment('production');
-
-?>
diff --git a/tests/Rector/Expr/AppEnvironmentComparisonToParameterRector/Fixture/skip_if_already_using_parameter.php.inc b/tests/Rector/Expr/AppEnvironmentComparisonToParameterRector/Fixture/skip_if_already_using_parameter.php.inc
deleted file mode 100644
index 922da8c0..00000000
--- a/tests/Rector/Expr/AppEnvironmentComparisonToParameterRector/Fixture/skip_if_already_using_parameter.php.inc
+++ /dev/null
@@ -1,8 +0,0 @@
-environment('production') === true;
-
-?>
diff --git a/tests/Rector/Expr/AppEnvironmentComparisonToParameterRector/Fixture/skip_if_not_application_object.php.inc b/tests/Rector/Expr/AppEnvironmentComparisonToParameterRector/Fixture/skip_if_not_application_object.php.inc
deleted file mode 100644
index c00fbf60..00000000
--- a/tests/Rector/Expr/AppEnvironmentComparisonToParameterRector/Fixture/skip_if_not_application_object.php.inc
+++ /dev/null
@@ -1,7 +0,0 @@
-environment() === 'production';
-
-?>
diff --git a/tests/Rector/Expr/AppEnvironmentComparisonToParameterRector/Fixture/skip_if_not_comparing_to_string.php.inc b/tests/Rector/Expr/AppEnvironmentComparisonToParameterRector/Fixture/skip_if_not_comparing_to_string.php.inc
deleted file mode 100644
index 7c05d2a5..00000000
--- a/tests/Rector/Expr/AppEnvironmentComparisonToParameterRector/Fixture/skip_if_not_comparing_to_string.php.inc
+++ /dev/null
@@ -1,7 +0,0 @@
-environment() === true;
-
-?>
diff --git a/tests/Rector/Expr/AppEnvironmentComparisonToParameterRector/Fixture/skip_if_not_using_facade.php.inc b/tests/Rector/Expr/AppEnvironmentComparisonToParameterRector/Fixture/skip_if_not_using_facade.php.inc
deleted file mode 100644
index 5ac0e5c3..00000000
--- a/tests/Rector/Expr/AppEnvironmentComparisonToParameterRector/Fixture/skip_if_not_using_facade.php.inc
+++ /dev/null
@@ -1,7 +0,0 @@
-
diff --git a/tests/Rector/Expr/AppEnvironmentComparisonToParameterRector/config/configured_rule.php b/tests/Rector/Expr/AppEnvironmentComparisonToParameterRector/config/configured_rule.php
deleted file mode 100644
index 3f726e26..00000000
--- a/tests/Rector/Expr/AppEnvironmentComparisonToParameterRector/config/configured_rule.php
+++ /dev/null
@@ -1,13 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
-
- $rectorConfig->rule(AppEnvironmentComparisonToParameterRector::class);
-};
diff --git a/tests/Rector/Expr/SubStrToStartsWithOrEndsWithStaticMethodCallRector/Fixture/fixture.php.inc b/tests/Rector/Expr/SubStrToStartsWithOrEndsWithStaticMethodCallRector/Fixture/fixture.php.inc
deleted file mode 100644
index 6b0bebfb..00000000
--- a/tests/Rector/Expr/SubStrToStartsWithOrEndsWithStaticMethodCallRector/Fixture/fixture.php.inc
+++ /dev/null
@@ -1,51 +0,0 @@
-
------
-
diff --git a/tests/Rector/Expr/SubStrToStartsWithOrEndsWithStaticMethodCallRector/Fixture/skips_non_ends_with.php.inc b/tests/Rector/Expr/SubStrToStartsWithOrEndsWithStaticMethodCallRector/Fixture/skips_non_ends_with.php.inc
deleted file mode 100644
index ece854c8..00000000
--- a/tests/Rector/Expr/SubStrToStartsWithOrEndsWithStaticMethodCallRector/Fixture/skips_non_ends_with.php.inc
+++ /dev/null
@@ -1,19 +0,0 @@
-
------
-
diff --git a/tests/Rector/Expr/SubStrToStartsWithOrEndsWithStaticMethodCallRector/Fixture/skips_non_starts_with.php.inc b/tests/Rector/Expr/SubStrToStartsWithOrEndsWithStaticMethodCallRector/Fixture/skips_non_starts_with.php.inc
deleted file mode 100644
index 28e5dce2..00000000
--- a/tests/Rector/Expr/SubStrToStartsWithOrEndsWithStaticMethodCallRector/Fixture/skips_non_starts_with.php.inc
+++ /dev/null
@@ -1,19 +0,0 @@
-
------
-
diff --git a/tests/Rector/Expr/SubStrToStartsWithOrEndsWithStaticMethodCallRector/SubStrToStartsWithOrEndsWithStaticMethodCallRectorTest.php b/tests/Rector/Expr/SubStrToStartsWithOrEndsWithStaticMethodCallRector/SubStrToStartsWithOrEndsWithStaticMethodCallRectorTest.php
deleted file mode 100644
index 55c39bb9..00000000
--- a/tests/Rector/Expr/SubStrToStartsWithOrEndsWithStaticMethodCallRector/SubStrToStartsWithOrEndsWithStaticMethodCallRectorTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/Expr/SubStrToStartsWithOrEndsWithStaticMethodCallRector/config/configured_rule.php b/tests/Rector/Expr/SubStrToStartsWithOrEndsWithStaticMethodCallRector/config/configured_rule.php
deleted file mode 100644
index 00fec928..00000000
--- a/tests/Rector/Expr/SubStrToStartsWithOrEndsWithStaticMethodCallRector/config/configured_rule.php
+++ /dev/null
@@ -1,12 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
-
- $rectorConfig->rule(SubStrToStartsWithOrEndsWithStaticMethodCallRector::class);
-};
diff --git a/tests/Rector/FuncCall/ArgumentFuncCallToMethodCallRector/ArgumentFuncCallToMethodCallRectorTest.php b/tests/Rector/FuncCall/ArgumentFuncCallToMethodCallRector/ArgumentFuncCallToMethodCallRectorTest.php
deleted file mode 100644
index 09cfa6e3..00000000
--- a/tests/Rector/FuncCall/ArgumentFuncCallToMethodCallRector/ArgumentFuncCallToMethodCallRectorTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/FuncCall/ArgumentFuncCallToMethodCallRector/Fixture/auth.php.inc b/tests/Rector/FuncCall/ArgumentFuncCallToMethodCallRector/Fixture/auth.php.inc
deleted file mode 100644
index 664d3af5..00000000
--- a/tests/Rector/FuncCall/ArgumentFuncCallToMethodCallRector/Fixture/auth.php.inc
+++ /dev/null
@@ -1,30 +0,0 @@
-
------
-guard;
- }
-}
-
-?>
diff --git a/tests/Rector/FuncCall/ArgumentFuncCallToMethodCallRector/Fixture/back.php.inc b/tests/Rector/FuncCall/ArgumentFuncCallToMethodCallRector/Fixture/back.php.inc
deleted file mode 100644
index 865abe30..00000000
--- a/tests/Rector/FuncCall/ArgumentFuncCallToMethodCallRector/Fixture/back.php.inc
+++ /dev/null
@@ -1,40 +0,0 @@
-
------
-redirector->back();
- }
-
- public function actionWithParams()
- {
- return $this->redirector->back(200);
- }
-}
-
-?>
diff --git a/tests/Rector/FuncCall/ArgumentFuncCallToMethodCallRector/Fixture/broadcast.php.inc b/tests/Rector/FuncCall/ArgumentFuncCallToMethodCallRector/Fixture/broadcast.php.inc
deleted file mode 100644
index e7d5e9d0..00000000
--- a/tests/Rector/FuncCall/ArgumentFuncCallToMethodCallRector/Fixture/broadcast.php.inc
+++ /dev/null
@@ -1,30 +0,0 @@
-
------
-broadcastingFactory->event('template.blade');
- }
-}
-
-?>
diff --git a/tests/Rector/FuncCall/ArgumentFuncCallToMethodCallRector/Fixture/config.php.inc b/tests/Rector/FuncCall/ArgumentFuncCallToMethodCallRector/Fixture/config.php.inc
deleted file mode 100644
index 9249f9ec..00000000
--- a/tests/Rector/FuncCall/ArgumentFuncCallToMethodCallRector/Fixture/config.php.inc
+++ /dev/null
@@ -1,40 +0,0 @@
- $value]);
- }
-}
-
-?>
------
-configRepository->get('value');
- }
-
- public function actionSet($value)
- {
- $this->configRepository->set(['value' => $value]);
- }
-}
-
-?>
diff --git a/tests/Rector/FuncCall/ArgumentFuncCallToMethodCallRector/Fixture/route.php.inc b/tests/Rector/FuncCall/ArgumentFuncCallToMethodCallRector/Fixture/route.php.inc
deleted file mode 100644
index fa39ff7a..00000000
--- a/tests/Rector/FuncCall/ArgumentFuncCallToMethodCallRector/Fixture/route.php.inc
+++ /dev/null
@@ -1,30 +0,0 @@
-
------
-urlGenerator->route('template.blade');
- }
-}
-
-?>
diff --git a/tests/Rector/FuncCall/ArgumentFuncCallToMethodCallRector/Fixture/session.php.inc b/tests/Rector/FuncCall/ArgumentFuncCallToMethodCallRector/Fixture/session.php.inc
deleted file mode 100644
index b092f650..00000000
--- a/tests/Rector/FuncCall/ArgumentFuncCallToMethodCallRector/Fixture/session.php.inc
+++ /dev/null
@@ -1,34 +0,0 @@
-
------
-sessionManager;
- $this->sessionManager->put(['key']);
- $this->sessionManager->get('key', 'value');
- }
-}
-
-?>
diff --git a/tests/Rector/FuncCall/ArgumentFuncCallToMethodCallRector/Fixture/skip_static_method.php.inc b/tests/Rector/FuncCall/ArgumentFuncCallToMethodCallRector/Fixture/skip_static_method.php.inc
deleted file mode 100644
index 9017b1ff..00000000
--- a/tests/Rector/FuncCall/ArgumentFuncCallToMethodCallRector/Fixture/skip_static_method.php.inc
+++ /dev/null
@@ -1,11 +0,0 @@
-
------
-viewFactory->make('template.blade');
- $viewFactory = $this->viewFactory;
- }
-}
-
-?>
diff --git a/tests/Rector/FuncCall/ArgumentFuncCallToMethodCallRector/config/configured_rule.php b/tests/Rector/FuncCall/ArgumentFuncCallToMethodCallRector/config/configured_rule.php
deleted file mode 100644
index c324da72..00000000
--- a/tests/Rector/FuncCall/ArgumentFuncCallToMethodCallRector/config/configured_rule.php
+++ /dev/null
@@ -1,22 +0,0 @@
-ruleWithConfiguration(ArgumentFuncCallToMethodCallRector::class, [
- new ArgumentFuncCallToMethodCall('auth', 'Illuminate\Contracts\Auth\Guard'),
- new ArgumentFuncCallToMethodCall('view', 'Illuminate\Contracts\View\Factory', 'make'),
- new ArgumentFuncCallToMethodCall('route', 'Illuminate\Routing\UrlGenerator', 'route'),
- new ArgumentFuncCallToMethodCall('back', 'Illuminate\Routing\Redirector', 'back', 'back'),
- new ArgumentFuncCallToMethodCall('broadcast', 'Illuminate\Contracts\Broadcasting\Factory', 'event'),
-
- new ArrayFuncCallToMethodCall('config', 'Illuminate\Contracts\Config\Repository', 'set', 'get'),
- new ArrayFuncCallToMethodCall('session', 'Illuminate\Session\SessionManager', 'put', 'get'),
- ]);
-};
diff --git a/tests/Rector/FuncCall/FactoryFuncCallToStaticCallRector/FactoryFuncCallToStaticCallRectorTest.php b/tests/Rector/FuncCall/FactoryFuncCallToStaticCallRector/FactoryFuncCallToStaticCallRectorTest.php
deleted file mode 100644
index b9a34d8a..00000000
--- a/tests/Rector/FuncCall/FactoryFuncCallToStaticCallRector/FactoryFuncCallToStaticCallRectorTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/FuncCall/FactoryFuncCallToStaticCallRector/Fixture/fixture.php.inc b/tests/Rector/FuncCall/FactoryFuncCallToStaticCallRector/Fixture/fixture.php.inc
deleted file mode 100644
index 51133d7d..00000000
--- a/tests/Rector/FuncCall/FactoryFuncCallToStaticCallRector/Fixture/fixture.php.inc
+++ /dev/null
@@ -1,17 +0,0 @@
-
------
-
diff --git a/tests/Rector/FuncCall/FactoryFuncCallToStaticCallRector/config/configured_rule.php b/tests/Rector/FuncCall/FactoryFuncCallToStaticCallRector/config/configured_rule.php
deleted file mode 100644
index caaabed0..00000000
--- a/tests/Rector/FuncCall/FactoryFuncCallToStaticCallRector/config/configured_rule.php
+++ /dev/null
@@ -1,13 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
-
- $rectorConfig->rule(FactoryFuncCallToStaticCallRector::class);
-};
diff --git a/tests/Rector/FuncCall/HelperFuncCallToFacadeClassRector/Fixture/fixture.php.inc b/tests/Rector/FuncCall/HelperFuncCallToFacadeClassRector/Fixture/fixture.php.inc
deleted file mode 100644
index ed5bf67a..00000000
--- a/tests/Rector/FuncCall/HelperFuncCallToFacadeClassRector/Fixture/fixture.php.inc
+++ /dev/null
@@ -1,27 +0,0 @@
-trans('value');
- }
-}
-
-?>
------
-trans('value');
- }
-}
-
-?>
diff --git a/tests/Rector/FuncCall/HelperFuncCallToFacadeClassRector/Fixture/skip_with_args.php.inc b/tests/Rector/FuncCall/HelperFuncCallToFacadeClassRector/Fixture/skip_with_args.php.inc
deleted file mode 100644
index ac866df5..00000000
--- a/tests/Rector/FuncCall/HelperFuncCallToFacadeClassRector/Fixture/skip_with_args.php.inc
+++ /dev/null
@@ -1,11 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/FuncCall/HelperFuncCallToFacadeClassRector/config/configured_rule.php b/tests/Rector/FuncCall/HelperFuncCallToFacadeClassRector/config/configured_rule.php
deleted file mode 100644
index 9520208c..00000000
--- a/tests/Rector/FuncCall/HelperFuncCallToFacadeClassRector/config/configured_rule.php
+++ /dev/null
@@ -1,13 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
-
- $rectorConfig->rule(HelperFuncCallToFacadeClassRector::class);
-};
diff --git a/tests/Rector/FuncCall/NotFilledBlankFuncCallToBlankFilledFuncCallRector/Fixture/fixture.php.inc b/tests/Rector/FuncCall/NotFilledBlankFuncCallToBlankFilledFuncCallRector/Fixture/fixture.php.inc
deleted file mode 100644
index 8b04d41c..00000000
--- a/tests/Rector/FuncCall/NotFilledBlankFuncCallToBlankFilledFuncCallRector/Fixture/fixture.php.inc
+++ /dev/null
@@ -1,29 +0,0 @@
-
------
-
diff --git a/tests/Rector/FuncCall/NotFilledBlankFuncCallToBlankFilledFuncCallRector/NotFilledBlankFuncCallToBlankFilledFuncCallRectorTest.php b/tests/Rector/FuncCall/NotFilledBlankFuncCallToBlankFilledFuncCallRector/NotFilledBlankFuncCallToBlankFilledFuncCallRectorTest.php
deleted file mode 100644
index 77bc9c9e..00000000
--- a/tests/Rector/FuncCall/NotFilledBlankFuncCallToBlankFilledFuncCallRector/NotFilledBlankFuncCallToBlankFilledFuncCallRectorTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/FuncCall/NotFilledBlankFuncCallToBlankFilledFuncCallRector/config/configured_rule.php b/tests/Rector/FuncCall/NotFilledBlankFuncCallToBlankFilledFuncCallRector/config/configured_rule.php
deleted file mode 100644
index 70ed29a4..00000000
--- a/tests/Rector/FuncCall/NotFilledBlankFuncCallToBlankFilledFuncCallRector/config/configured_rule.php
+++ /dev/null
@@ -1,13 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
-
- $rectorConfig->rule(NotFilledBlankFuncCallToBlankFilledFuncCallRector::class);
-};
diff --git a/tests/Rector/FuncCall/NowFuncWithStartOfDayMethodCallToTodayFuncRector/Fixture/fixture.php.inc b/tests/Rector/FuncCall/NowFuncWithStartOfDayMethodCallToTodayFuncRector/Fixture/fixture.php.inc
deleted file mode 100644
index 78cc125f..00000000
--- a/tests/Rector/FuncCall/NowFuncWithStartOfDayMethodCallToTodayFuncRector/Fixture/fixture.php.inc
+++ /dev/null
@@ -1,29 +0,0 @@
-startOfDay();
- $tomorrow = now()->startOfDay()->addDay();
- }
-}
-
-?>
------
-addDay();
- }
-}
-
-?>
diff --git a/tests/Rector/FuncCall/NowFuncWithStartOfDayMethodCallToTodayFuncRector/Fixture/skip_now_with_other_calls.php.inc b/tests/Rector/FuncCall/NowFuncWithStartOfDayMethodCallToTodayFuncRector/Fixture/skip_now_with_other_calls.php.inc
deleted file mode 100644
index 9d4fd1b9..00000000
--- a/tests/Rector/FuncCall/NowFuncWithStartOfDayMethodCallToTodayFuncRector/Fixture/skip_now_with_other_calls.php.inc
+++ /dev/null
@@ -1,27 +0,0 @@
-addDay()->startOfDay();
- }
-}
-
-?>
------
-addDay()->startOfDay();
- }
-}
-
-?>
diff --git a/tests/Rector/FuncCall/NowFuncWithStartOfDayMethodCallToTodayFuncRector/NowFuncWithStartOfDayMethodCallToTodayFuncRectorTest.php b/tests/Rector/FuncCall/NowFuncWithStartOfDayMethodCallToTodayFuncRector/NowFuncWithStartOfDayMethodCallToTodayFuncRectorTest.php
deleted file mode 100644
index 93962897..00000000
--- a/tests/Rector/FuncCall/NowFuncWithStartOfDayMethodCallToTodayFuncRector/NowFuncWithStartOfDayMethodCallToTodayFuncRectorTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/FuncCall/NowFuncWithStartOfDayMethodCallToTodayFuncRector/config/configured_rule.php b/tests/Rector/FuncCall/NowFuncWithStartOfDayMethodCallToTodayFuncRector/config/configured_rule.php
deleted file mode 100644
index b6dd6e5e..00000000
--- a/tests/Rector/FuncCall/NowFuncWithStartOfDayMethodCallToTodayFuncRector/config/configured_rule.php
+++ /dev/null
@@ -1,13 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
-
- $rectorConfig->rule(NowFuncWithStartOfDayMethodCallToTodayFuncRector::class);
-};
diff --git a/tests/Rector/FuncCall/RemoveDumpDataDeadCodeRector/Fixture/fixture.php.inc b/tests/Rector/FuncCall/RemoveDumpDataDeadCodeRector/Fixture/fixture.php.inc
deleted file mode 100644
index 22dbe30b..00000000
--- a/tests/Rector/FuncCall/RemoveDumpDataDeadCodeRector/Fixture/fixture.php.inc
+++ /dev/null
@@ -1,39 +0,0 @@
-
------
-
diff --git a/tests/Rector/FuncCall/RemoveDumpDataDeadCodeRector/Fixture/skip_as_if_condition.php.inc b/tests/Rector/FuncCall/RemoveDumpDataDeadCodeRector/Fixture/skip_as_if_condition.php.inc
deleted file mode 100644
index 1526b724..00000000
--- a/tests/Rector/FuncCall/RemoveDumpDataDeadCodeRector/Fixture/skip_as_if_condition.php.inc
+++ /dev/null
@@ -1,17 +0,0 @@
-
diff --git a/tests/Rector/FuncCall/RemoveDumpDataDeadCodeRector/Fixture/skip_with_object_call.php.inc b/tests/Rector/FuncCall/RemoveDumpDataDeadCodeRector/Fixture/skip_with_object_call.php.inc
deleted file mode 100644
index cd5490b8..00000000
--- a/tests/Rector/FuncCall/RemoveDumpDataDeadCodeRector/Fixture/skip_with_object_call.php.inc
+++ /dev/null
@@ -1,17 +0,0 @@
-dd();
-
- return true;
- }
-}
-
-?>
diff --git a/tests/Rector/FuncCall/RemoveDumpDataDeadCodeRector/Fixture/skip_with_relevant_name.php.inc b/tests/Rector/FuncCall/RemoveDumpDataDeadCodeRector/Fixture/skip_with_relevant_name.php.inc
deleted file mode 100644
index 9762d81b..00000000
--- a/tests/Rector/FuncCall/RemoveDumpDataDeadCodeRector/Fixture/skip_with_relevant_name.php.inc
+++ /dev/null
@@ -1,13 +0,0 @@
-
diff --git a/tests/Rector/FuncCall/RemoveDumpDataDeadCodeRector/RemoveDumpDataDeadCodeRectorTest.php b/tests/Rector/FuncCall/RemoveDumpDataDeadCodeRector/RemoveDumpDataDeadCodeRectorTest.php
deleted file mode 100644
index 4dcc4d41..00000000
--- a/tests/Rector/FuncCall/RemoveDumpDataDeadCodeRector/RemoveDumpDataDeadCodeRectorTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/FuncCall/RemoveDumpDataDeadCodeRector/config/configured_rule.php b/tests/Rector/FuncCall/RemoveDumpDataDeadCodeRector/config/configured_rule.php
deleted file mode 100644
index bb9b9708..00000000
--- a/tests/Rector/FuncCall/RemoveDumpDataDeadCodeRector/config/configured_rule.php
+++ /dev/null
@@ -1,13 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
-
- $rectorConfig->rule(RemoveDumpDataDeadCodeRector::class);
-};
diff --git a/tests/Rector/FuncCall/SleepFuncToSleepStaticCallRector/Fixture/fixture.php.inc b/tests/Rector/FuncCall/SleepFuncToSleepStaticCallRector/Fixture/fixture.php.inc
deleted file mode 100644
index 3e6680df..00000000
--- a/tests/Rector/FuncCall/SleepFuncToSleepStaticCallRector/Fixture/fixture.php.inc
+++ /dev/null
@@ -1,31 +0,0 @@
-
------
-
diff --git a/tests/Rector/FuncCall/SleepFuncToSleepStaticCallRector/Fixture/skip_as_using_return.php.inc b/tests/Rector/FuncCall/SleepFuncToSleepStaticCallRector/Fixture/skip_as_using_return.php.inc
deleted file mode 100644
index 300c5cd3..00000000
--- a/tests/Rector/FuncCall/SleepFuncToSleepStaticCallRector/Fixture/skip_as_using_return.php.inc
+++ /dev/null
@@ -1,21 +0,0 @@
-
diff --git a/tests/Rector/FuncCall/SleepFuncToSleepStaticCallRector/SleepFuncToSleepStaticCallRectorTest.php b/tests/Rector/FuncCall/SleepFuncToSleepStaticCallRector/SleepFuncToSleepStaticCallRectorTest.php
deleted file mode 100644
index c0850ac5..00000000
--- a/tests/Rector/FuncCall/SleepFuncToSleepStaticCallRector/SleepFuncToSleepStaticCallRectorTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/FuncCall/SleepFuncToSleepStaticCallRector/config/configured_rule.php b/tests/Rector/FuncCall/SleepFuncToSleepStaticCallRector/config/configured_rule.php
deleted file mode 100644
index 3d4ca175..00000000
--- a/tests/Rector/FuncCall/SleepFuncToSleepStaticCallRector/config/configured_rule.php
+++ /dev/null
@@ -1,13 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
-
- $rectorConfig->rule(SleepFuncToSleepStaticCallRector::class);
-};
diff --git a/tests/Rector/MethodCall/AssertStatusToAssertMethodRector/AssertStatusToAssertMethodTest.php b/tests/Rector/MethodCall/AssertStatusToAssertMethodRector/AssertStatusToAssertMethodTest.php
deleted file mode 100644
index dcfb2847..00000000
--- a/tests/Rector/MethodCall/AssertStatusToAssertMethodRector/AssertStatusToAssertMethodTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/MethodCall/AssertStatusToAssertMethodRector/Fixture/fixture_with_illuminate_response_constants.php.inc b/tests/Rector/MethodCall/AssertStatusToAssertMethodRector/Fixture/fixture_with_illuminate_response_constants.php.inc
deleted file mode 100644
index 7990c82e..00000000
--- a/tests/Rector/MethodCall/AssertStatusToAssertMethodRector/Fixture/fixture_with_illuminate_response_constants.php.inc
+++ /dev/null
@@ -1,117 +0,0 @@
-assertStatus(\Symfony\Component\HttpFoundation\Response::HTTP_OK);
- }
-
- public function testNoContent(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertStatus(\Symfony\Component\HttpFoundation\Response::HTTP_NO_CONTENT);
- }
-
- public function testForbidden(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertStatus(\Symfony\Component\HttpFoundation\Response::HTTP_FORBIDDEN);
- }
-
- public function testNotFound(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertStatus(\Symfony\Component\HttpFoundation\Response::HTTP_NOT_FOUND);
- }
-
- public function testMethodNotAllowed(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertStatus(\Symfony\Component\HttpFoundation\Response::HTTP_METHOD_NOT_ALLOWED);
- }
-
- public function testUnauthorized(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertStatus(\Symfony\Component\HttpFoundation\Response::HTTP_UNAUTHORIZED);
- }
-
- public function testUnprocessableEntity(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertStatus(\Symfony\Component\HttpFoundation\Response::HTTP_UNPROCESSABLE_ENTITY);
- }
-
- public function testGone(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertStatus(\Symfony\Component\HttpFoundation\Response::HTTP_GONE);
- }
-
- public function testInternalServerError(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertStatus(\Symfony\Component\HttpFoundation\Response::HTTP_INTERNAL_SERVER_ERROR);
- }
-
- public function testServiceUnavailable(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertStatus(\Symfony\Component\HttpFoundation\Response::HTTP_SERVICE_UNAVAILABLE);
- }
-}
-
-?>
------
-assertOk();
- }
-
- public function testNoContent(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertNoContent();
- }
-
- public function testForbidden(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertForbidden();
- }
-
- public function testNotFound(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertNotFound();
- }
-
- public function testMethodNotAllowed(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertMethodNotAllowed();
- }
-
- public function testUnauthorized(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertUnauthorized();
- }
-
- public function testUnprocessableEntity(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertUnprocessable();
- }
-
- public function testGone(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertGone();
- }
-
- public function testInternalServerError(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertInternalServerError();
- }
-
- public function testServiceUnavailable(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertServiceUnavailable();
- }
-}
-
-?>
diff --git a/tests/Rector/MethodCall/AssertStatusToAssertMethodRector/Fixture/fixture_with_magic_numbers.php.inc b/tests/Rector/MethodCall/AssertStatusToAssertMethodRector/Fixture/fixture_with_magic_numbers.php.inc
deleted file mode 100644
index 4cf7db20..00000000
--- a/tests/Rector/MethodCall/AssertStatusToAssertMethodRector/Fixture/fixture_with_magic_numbers.php.inc
+++ /dev/null
@@ -1,117 +0,0 @@
-assertStatus(200);
- }
-
- public function testNoContent(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertStatus(204);
- }
-
- public function testForbidden(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertStatus(403);
- }
-
- public function testNotFound(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertStatus(404);
- }
-
- public function testMethodNotAllowed(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertStatus(405);
- }
-
- public function testUnauthorized(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertStatus(401);
- }
-
- public function testUnprocessableEntity(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertStatus(422);
- }
-
- public function testGone(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertStatus(410);
- }
-
- public function testInternalServerError(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertStatus(500);
- }
-
- public function testServiceUnavailable(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertStatus(503);
- }
-}
-
-?>
------
-assertOk();
- }
-
- public function testNoContent(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertNoContent();
- }
-
- public function testForbidden(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertForbidden();
- }
-
- public function testNotFound(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertNotFound();
- }
-
- public function testMethodNotAllowed(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertMethodNotAllowed();
- }
-
- public function testUnauthorized(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertUnauthorized();
- }
-
- public function testUnprocessableEntity(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertUnprocessable();
- }
-
- public function testGone(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertGone();
- }
-
- public function testInternalServerError(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertInternalServerError();
- }
-
- public function testServiceUnavailable(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertServiceUnavailable();
- }
-}
-
-?>
diff --git a/tests/Rector/MethodCall/AssertStatusToAssertMethodRector/Fixture/fixture_with_return_by_doctags.php.inc b/tests/Rector/MethodCall/AssertStatusToAssertMethodRector/Fixture/fixture_with_return_by_doctags.php.inc
deleted file mode 100644
index b59ced86..00000000
--- a/tests/Rector/MethodCall/AssertStatusToAssertMethodRector/Fixture/fixture_with_return_by_doctags.php.inc
+++ /dev/null
@@ -1,49 +0,0 @@
-get('/')->assertStatus(\Symfony\Component\HttpFoundation\Response::HTTP_OK);
- }
-}
-
-class TestCase
-{
- /**
- * @return \Illuminate\Testing\TestResponse
- */
- public function get($path)
- {
-
- }
-}
-
-?>
------
-get('/')->assertOk();
- }
-}
-
-class TestCase
-{
- /**
- * @return \Illuminate\Testing\TestResponse
- */
- public function get($path)
- {
-
- }
-}
-
-?>
diff --git a/tests/Rector/MethodCall/AssertStatusToAssertMethodRector/Fixture/fixture_with_symfony_response_constants.php.inc b/tests/Rector/MethodCall/AssertStatusToAssertMethodRector/Fixture/fixture_with_symfony_response_constants.php.inc
deleted file mode 100644
index a386476e..00000000
--- a/tests/Rector/MethodCall/AssertStatusToAssertMethodRector/Fixture/fixture_with_symfony_response_constants.php.inc
+++ /dev/null
@@ -1,87 +0,0 @@
-assertStatus(\Symfony\Component\HttpFoundation\Response::HTTP_OK);
- }
-
- public function testNoContent(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertStatus(\Symfony\Component\HttpFoundation\Response::HTTP_NO_CONTENT);
- }
-
- public function testForbidden(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertStatus(\Symfony\Component\HttpFoundation\Response::HTTP_FORBIDDEN);
- }
-
- public function testNotFound(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertStatus(\Symfony\Component\HttpFoundation\Response::HTTP_NOT_FOUND);
- }
-
- public function testMethodNotAllowed(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertStatus(\Symfony\Component\HttpFoundation\Response::HTTP_METHOD_NOT_ALLOWED);
- }
-
- public function testUnauthorized(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertStatus(\Symfony\Component\HttpFoundation\Response::HTTP_UNAUTHORIZED);
- }
-
- public function testUnprocessableEntity(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertStatus(\Symfony\Component\HttpFoundation\Response::HTTP_UNPROCESSABLE_ENTITY);
- }
-}
-
-?>
------
-assertOk();
- }
-
- public function testNoContent(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertNoContent();
- }
-
- public function testForbidden(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertForbidden();
- }
-
- public function testNotFound(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertNotFound();
- }
-
- public function testMethodNotAllowed(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertMethodNotAllowed();
- }
-
- public function testUnauthorized(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertUnauthorized();
- }
-
- public function testUnprocessableEntity(\Illuminate\Testing\TestResponse $response)
- {
- $response->assertUnprocessable();
- }
-}
-
-?>
diff --git a/tests/Rector/MethodCall/AssertStatusToAssertMethodRector/Fixture/skip_missing_non_response_constant.php.inc b/tests/Rector/MethodCall/AssertStatusToAssertMethodRector/Fixture/skip_missing_non_response_constant.php.inc
deleted file mode 100644
index 52d173b4..00000000
--- a/tests/Rector/MethodCall/AssertStatusToAssertMethodRector/Fixture/skip_missing_non_response_constant.php.inc
+++ /dev/null
@@ -1,27 +0,0 @@
-assertStatus(\Something\Response::HTTP_OK);
- }
-}
-
-?>
------
-assertStatus(\Something\Response::HTTP_OK);
- }
-}
-
-?>
diff --git a/tests/Rector/MethodCall/AssertStatusToAssertMethodRector/Fixture/skip_missing_status_code.php.inc b/tests/Rector/MethodCall/AssertStatusToAssertMethodRector/Fixture/skip_missing_status_code.php.inc
deleted file mode 100644
index ece003fd..00000000
--- a/tests/Rector/MethodCall/AssertStatusToAssertMethodRector/Fixture/skip_missing_status_code.php.inc
+++ /dev/null
@@ -1,27 +0,0 @@
-assertStatus();
- }
-}
-
-?>
------
-assertStatus();
- }
-}
-
-?>
diff --git a/tests/Rector/MethodCall/AssertStatusToAssertMethodRector/Fixture/skip_non_test_response_object.php.inc b/tests/Rector/MethodCall/AssertStatusToAssertMethodRector/Fixture/skip_non_test_response_object.php.inc
deleted file mode 100644
index b9da797b..00000000
--- a/tests/Rector/MethodCall/AssertStatusToAssertMethodRector/Fixture/skip_non_test_response_object.php.inc
+++ /dev/null
@@ -1,77 +0,0 @@
-assertStatus(200);
- }
-
- public function testNoContent($response)
- {
- $response->assertStatus(204);
- }
-
- public function testForbidden($response)
- {
- $response->assertStatus(403);
- }
-
- public function testNotFound($response)
- {
- $response->assertStatus(404);
- }
-
- public function testUnauthorized($response)
- {
- $response->assertStatus(401);
- }
-
- public function testUnprocessableEntity($response)
- {
- $response->assertStatus(422);
- }
-}
-
-?>
------
-assertStatus(200);
- }
-
- public function testNoContent($response)
- {
- $response->assertStatus(204);
- }
-
- public function testForbidden($response)
- {
- $response->assertStatus(403);
- }
-
- public function testNotFound($response)
- {
- $response->assertStatus(404);
- }
-
- public function testUnauthorized($response)
- {
- $response->assertStatus(401);
- }
-
- public function testUnprocessableEntity($response)
- {
- $response->assertStatus(422);
- }
-}
-
-?>
diff --git a/tests/Rector/MethodCall/AssertStatusToAssertMethodRector/Fixture/skip_with_non_assertStatus_method.php.inc b/tests/Rector/MethodCall/AssertStatusToAssertMethodRector/Fixture/skip_with_non_assertStatus_method.php.inc
deleted file mode 100644
index 9d667b38..00000000
--- a/tests/Rector/MethodCall/AssertStatusToAssertMethodRector/Fixture/skip_with_non_assertStatus_method.php.inc
+++ /dev/null
@@ -1,27 +0,0 @@
-assertStatuses();
- }
-}
-
-?>
------
-assertStatuses();
- }
-}
-
-?>
diff --git a/tests/Rector/MethodCall/AssertStatusToAssertMethodRector/Fixture/skip_with_too_many_args.php.inc b/tests/Rector/MethodCall/AssertStatusToAssertMethodRector/Fixture/skip_with_too_many_args.php.inc
deleted file mode 100644
index 0fb6fb8f..00000000
--- a/tests/Rector/MethodCall/AssertStatusToAssertMethodRector/Fixture/skip_with_too_many_args.php.inc
+++ /dev/null
@@ -1,27 +0,0 @@
-assertStatus(200, 'hello');
- }
-}
-
-?>
------
-assertStatus(200, 'hello');
- }
-}
-
-?>
diff --git a/tests/Rector/MethodCall/AssertStatusToAssertMethodRector/config/configured_rule.php b/tests/Rector/MethodCall/AssertStatusToAssertMethodRector/config/configured_rule.php
deleted file mode 100644
index d11e231c..00000000
--- a/tests/Rector/MethodCall/AssertStatusToAssertMethodRector/config/configured_rule.php
+++ /dev/null
@@ -1,13 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
-
- $rectorConfig->rule(AssertStatusToAssertMethodRector::class);
-};
diff --git a/tests/Rector/MethodCall/ChangeQueryWhereDateValueWithCarbonRector/ChangeQueryWhereDateValueWithCarbonRectorTest.php b/tests/Rector/MethodCall/ChangeQueryWhereDateValueWithCarbonRector/ChangeQueryWhereDateValueWithCarbonRectorTest.php
deleted file mode 100644
index b0cbafed..00000000
--- a/tests/Rector/MethodCall/ChangeQueryWhereDateValueWithCarbonRector/ChangeQueryWhereDateValueWithCarbonRectorTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/MethodCall/ChangeQueryWhereDateValueWithCarbonRector/Fixture/bigger_than.php.inc b/tests/Rector/MethodCall/ChangeQueryWhereDateValueWithCarbonRector/Fixture/bigger_than.php.inc
deleted file mode 100644
index 4b28ea99..00000000
--- a/tests/Rector/MethodCall/ChangeQueryWhereDateValueWithCarbonRector/Fixture/bigger_than.php.inc
+++ /dev/null
@@ -1,35 +0,0 @@
-whereDate('created_at', '>', Carbon::now());
- }
-}
-
-?>
------
-whereDate('created_at', '>=', $dateTime);
- $query->whereTime('created_at', '>=', $dateTime);
- }
-}
-
-?>
diff --git a/tests/Rector/MethodCall/ChangeQueryWhereDateValueWithCarbonRector/Fixture/carbon_now_with_call.php.inc b/tests/Rector/MethodCall/ChangeQueryWhereDateValueWithCarbonRector/Fixture/carbon_now_with_call.php.inc
deleted file mode 100644
index 743c9448..00000000
--- a/tests/Rector/MethodCall/ChangeQueryWhereDateValueWithCarbonRector/Fixture/carbon_now_with_call.php.inc
+++ /dev/null
@@ -1,35 +0,0 @@
-whereDate('created_at', '>', Carbon::now()->subDays(10000));
- }
-}
-
-?>
------
-subDays(10000);
- $query->whereDate('created_at', '>=', $dateTime);
- $query->whereTime('created_at', '>=', $dateTime);
- }
-}
-
-?>
diff --git a/tests/Rector/MethodCall/ChangeQueryWhereDateValueWithCarbonRector/Fixture/date_time_only.php.inc b/tests/Rector/MethodCall/ChangeQueryWhereDateValueWithCarbonRector/Fixture/date_time_only.php.inc
deleted file mode 100644
index 89143b46..00000000
--- a/tests/Rector/MethodCall/ChangeQueryWhereDateValueWithCarbonRector/Fixture/date_time_only.php.inc
+++ /dev/null
@@ -1,32 +0,0 @@
-whereDate('created_at', '>', $dateTime);
- }
-}
-
-?>
------
-whereDate('created_at', '>=', $dateTime);
- $query->whereTime('created_at', '>=', $dateTime);
- }
-}
-
-?>
diff --git a/tests/Rector/MethodCall/ChangeQueryWhereDateValueWithCarbonRector/Fixture/fixture.php.inc b/tests/Rector/MethodCall/ChangeQueryWhereDateValueWithCarbonRector/Fixture/fixture.php.inc
deleted file mode 100644
index 9a7804f1..00000000
--- a/tests/Rector/MethodCall/ChangeQueryWhereDateValueWithCarbonRector/Fixture/fixture.php.inc
+++ /dev/null
@@ -1,35 +0,0 @@
-whereDate('created_at', '<', Carbon::now());
- }
-}
-
-?>
------
-whereDate('created_at', '<=', $dateTime);
- $query->whereTime('created_at', '<=', $dateTime);
- }
-}
-
-?>
diff --git a/tests/Rector/MethodCall/ChangeQueryWhereDateValueWithCarbonRector/Fixture/skip_already_equal.php.inc b/tests/Rector/MethodCall/ChangeQueryWhereDateValueWithCarbonRector/Fixture/skip_already_equal.php.inc
deleted file mode 100644
index 30a17e83..00000000
--- a/tests/Rector/MethodCall/ChangeQueryWhereDateValueWithCarbonRector/Fixture/skip_already_equal.php.inc
+++ /dev/null
@@ -1,15 +0,0 @@
-whereDate('created_at', '<=', $dateTime);
- }
-}
diff --git a/tests/Rector/MethodCall/ChangeQueryWhereDateValueWithCarbonRector/Fixture/skip_carbon_today.php.inc b/tests/Rector/MethodCall/ChangeQueryWhereDateValueWithCarbonRector/Fixture/skip_carbon_today.php.inc
deleted file mode 100644
index b10cbe15..00000000
--- a/tests/Rector/MethodCall/ChangeQueryWhereDateValueWithCarbonRector/Fixture/skip_carbon_today.php.inc
+++ /dev/null
@@ -1,14 +0,0 @@
-whereDate('created_at', '>', Carbon::today());
- }
-}
diff --git a/tests/Rector/MethodCall/ChangeQueryWhereDateValueWithCarbonRector/Fixture/skip_two_args_only.php.inc b/tests/Rector/MethodCall/ChangeQueryWhereDateValueWithCarbonRector/Fixture/skip_two_args_only.php.inc
deleted file mode 100644
index 32761ebf..00000000
--- a/tests/Rector/MethodCall/ChangeQueryWhereDateValueWithCarbonRector/Fixture/skip_two_args_only.php.inc
+++ /dev/null
@@ -1,14 +0,0 @@
-whereDate('created_at', Carbon::now());
- }
-}
diff --git a/tests/Rector/MethodCall/ChangeQueryWhereDateValueWithCarbonRector/Fixture/variable_date_time.php.inc b/tests/Rector/MethodCall/ChangeQueryWhereDateValueWithCarbonRector/Fixture/variable_date_time.php.inc
deleted file mode 100644
index 19754fb9..00000000
--- a/tests/Rector/MethodCall/ChangeQueryWhereDateValueWithCarbonRector/Fixture/variable_date_time.php.inc
+++ /dev/null
@@ -1,36 +0,0 @@
-whereDate('created_at', '<', $dateTime);
- }
-}
-
-?>
------
-whereDate('created_at', '<=', $dateTime);
- $query->whereTime('created_at', '<=', $dateTime);
- }
-}
-
-?>
diff --git a/tests/Rector/MethodCall/ChangeQueryWhereDateValueWithCarbonRector/config/configured_rule.php b/tests/Rector/MethodCall/ChangeQueryWhereDateValueWithCarbonRector/config/configured_rule.php
deleted file mode 100644
index 03a73ca3..00000000
--- a/tests/Rector/MethodCall/ChangeQueryWhereDateValueWithCarbonRector/config/configured_rule.php
+++ /dev/null
@@ -1,13 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
-
- $rectorConfig->rule(ChangeQueryWhereDateValueWithCarbonRector::class);
-};
diff --git a/tests/Rector/MethodCall/DatabaseExpressionToStringToMethodCallRector/DatabaseExpressionToStringToMethodCallRectorTest.php b/tests/Rector/MethodCall/DatabaseExpressionToStringToMethodCallRector/DatabaseExpressionToStringToMethodCallRectorTest.php
deleted file mode 100644
index d17dbf1e..00000000
--- a/tests/Rector/MethodCall/DatabaseExpressionToStringToMethodCallRector/DatabaseExpressionToStringToMethodCallRectorTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/MethodCall/DatabaseExpressionToStringToMethodCallRector/Fixture/fixture.php.inc b/tests/Rector/MethodCall/DatabaseExpressionToStringToMethodCallRector/Fixture/fixture.php.inc
deleted file mode 100644
index 70be4445..00000000
--- a/tests/Rector/MethodCall/DatabaseExpressionToStringToMethodCallRector/Fixture/fixture.php.inc
+++ /dev/null
@@ -1,19 +0,0 @@
-__toString();
-
-?>
------
-getValue(\Illuminate\Support\Facades\DB::connection()->getQueryGrammar());
-
-?>
diff --git a/tests/Rector/MethodCall/DatabaseExpressionToStringToMethodCallRector/Fixture/skip_other_usages.php.inc b/tests/Rector/MethodCall/DatabaseExpressionToStringToMethodCallRector/Fixture/skip_other_usages.php.inc
deleted file mode 100644
index 811cbd07..00000000
--- a/tests/Rector/MethodCall/DatabaseExpressionToStringToMethodCallRector/Fixture/skip_other_usages.php.inc
+++ /dev/null
@@ -1,9 +0,0 @@
-where('name', DB::raw('select 1'))->get();
-
-?>
diff --git a/tests/Rector/MethodCall/DatabaseExpressionToStringToMethodCallRector/config/configured_rule.php b/tests/Rector/MethodCall/DatabaseExpressionToStringToMethodCallRector/config/configured_rule.php
deleted file mode 100644
index 081f2110..00000000
--- a/tests/Rector/MethodCall/DatabaseExpressionToStringToMethodCallRector/config/configured_rule.php
+++ /dev/null
@@ -1,12 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
-
- $rectorConfig->rule(DatabaseExpressionToStringToMethodCallRector::class);
-};
diff --git a/tests/Rector/MethodCall/EloquentOrderByToLatestOrOldestRector/EloquentOrderByToLatestOrOldestRectorTest.php b/tests/Rector/MethodCall/EloquentOrderByToLatestOrOldestRector/EloquentOrderByToLatestOrOldestRectorTest.php
deleted file mode 100644
index 55916ee9..00000000
--- a/tests/Rector/MethodCall/EloquentOrderByToLatestOrOldestRector/EloquentOrderByToLatestOrOldestRectorTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/MethodCall/EloquentOrderByToLatestOrOldestRector/Fixture/fixture.php.inc b/tests/Rector/MethodCall/EloquentOrderByToLatestOrOldestRector/Fixture/fixture.php.inc
deleted file mode 100644
index 44bffe79..00000000
--- a/tests/Rector/MethodCall/EloquentOrderByToLatestOrOldestRector/Fixture/fixture.php.inc
+++ /dev/null
@@ -1,33 +0,0 @@
-orderBy('created_at');
-$query->orderBy('created_at', 'desc');
-$query->orderBy('submitted_at');
-$query->orderByDesc('submitted_at');
-$query->orderBy($column);
-
-?>
------
-latest();
-$query->oldest();
-$query->latest('submitted_at');
-$query->oldest('submitted_at');
-$query->latest($column);
-
-?>
diff --git a/tests/Rector/MethodCall/EloquentOrderByToLatestOrOldestRector/Fixture/skip_if_not_eloquent_builder.php.inc b/tests/Rector/MethodCall/EloquentOrderByToLatestOrOldestRector/Fixture/skip_if_not_eloquent_builder.php.inc
deleted file mode 100644
index 38525e69..00000000
--- a/tests/Rector/MethodCall/EloquentOrderByToLatestOrOldestRector/Fixture/skip_if_not_eloquent_builder.php.inc
+++ /dev/null
@@ -1,7 +0,0 @@
-orderBy('created_at');
-
-?>
diff --git a/tests/Rector/MethodCall/EloquentOrderByToLatestOrOldestRector/Fixture/skip_if_not_enough_arguments.php.inc b/tests/Rector/MethodCall/EloquentOrderByToLatestOrOldestRector/Fixture/skip_if_not_enough_arguments.php.inc
deleted file mode 100644
index 882588c0..00000000
--- a/tests/Rector/MethodCall/EloquentOrderByToLatestOrOldestRector/Fixture/skip_if_not_enough_arguments.php.inc
+++ /dev/null
@@ -1,10 +0,0 @@
-orderBy();
-
-?>
diff --git a/tests/Rector/MethodCall/EloquentOrderByToLatestOrOldestRector/config/configured_rule.php b/tests/Rector/MethodCall/EloquentOrderByToLatestOrOldestRector/config/configured_rule.php
deleted file mode 100644
index d3e399ff..00000000
--- a/tests/Rector/MethodCall/EloquentOrderByToLatestOrOldestRector/config/configured_rule.php
+++ /dev/null
@@ -1,12 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
-
- $rectorConfig->rule(EloquentOrderByToLatestOrOldestRector::class);
-};
diff --git a/tests/Rector/MethodCall/EloquentWhereRelationTypeHintingParameterRector/EloquentWhereRelationTypeHintingParameterRectorTest.php b/tests/Rector/MethodCall/EloquentWhereRelationTypeHintingParameterRector/EloquentWhereRelationTypeHintingParameterRectorTest.php
deleted file mode 100644
index e2e85038..00000000
--- a/tests/Rector/MethodCall/EloquentWhereRelationTypeHintingParameterRector/EloquentWhereRelationTypeHintingParameterRectorTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/MethodCall/EloquentWhereRelationTypeHintingParameterRector/Fixture/fixture.php.inc b/tests/Rector/MethodCall/EloquentWhereRelationTypeHintingParameterRector/Fixture/fixture.php.inc
deleted file mode 100644
index bf809532..00000000
--- a/tests/Rector/MethodCall/EloquentWhereRelationTypeHintingParameterRector/Fixture/fixture.php.inc
+++ /dev/null
@@ -1,77 +0,0 @@
-whereHas('posts', function ($query) {
- $query->where('is_published', true);
-});
-
-$query->orWhereHas('posts', function ($query) {
- $query->where('is_published', true);
-});
-
-$query->whereDoesntHave('posts', function ($query) {
- $query->where('is_published', true);
-});
-
-$query->orWhereDoesntHave('posts', function ($query) {
- $query->where('is_published', true);
-});
-
-$query->whereHasMorph('posts', [], function ($query) {
- $query->where('is_published', true);
-});
-
-$query->orWhereHasMorph('posts', [], function ($query) {
- $query->where('is_published', true);
-});
-
-$query->whereDoesntHaveMorph('posts', [], function ($query) {
- $query->where('is_published', true);
-});
-
-$query->orWhereDoesntHaveMorph('posts', [], function ($query) {
- $query->where('is_published', true);
-});
-
-?>
------
-whereHas('posts', function (\Illuminate\Contracts\Database\Query\Builder $query) {
- $query->where('is_published', true);
-});
-
-$query->orWhereHas('posts', function (\Illuminate\Contracts\Database\Query\Builder $query) {
- $query->where('is_published', true);
-});
-
-$query->whereDoesntHave('posts', function (\Illuminate\Contracts\Database\Query\Builder $query) {
- $query->where('is_published', true);
-});
-
-$query->orWhereDoesntHave('posts', function (\Illuminate\Contracts\Database\Query\Builder $query) {
- $query->where('is_published', true);
-});
-
-$query->whereHasMorph('posts', [], function (\Illuminate\Contracts\Database\Query\Builder $query) {
- $query->where('is_published', true);
-});
-
-$query->orWhereHasMorph('posts', [], function (\Illuminate\Contracts\Database\Query\Builder $query) {
- $query->where('is_published', true);
-});
-
-$query->whereDoesntHaveMorph('posts', [], function (\Illuminate\Contracts\Database\Query\Builder $query) {
- $query->where('is_published', true);
-});
-
-$query->orWhereDoesntHaveMorph('posts', [], function (\Illuminate\Contracts\Database\Query\Builder $query) {
- $query->where('is_published', true);
-});
-
-?>
diff --git a/tests/Rector/MethodCall/EloquentWhereRelationTypeHintingParameterRector/Fixture/fixture2.php.inc b/tests/Rector/MethodCall/EloquentWhereRelationTypeHintingParameterRector/Fixture/fixture2.php.inc
deleted file mode 100644
index f784bcd3..00000000
--- a/tests/Rector/MethodCall/EloquentWhereRelationTypeHintingParameterRector/Fixture/fixture2.php.inc
+++ /dev/null
@@ -1,21 +0,0 @@
-whereHas('posts', fn ($query) =>
- $query->where('is_published', true)
-);
-
-?>
------
-whereHas('posts', fn (\Illuminate\Contracts\Database\Query\Builder $query) =>
- $query->where('is_published', true)
-);
-
-?>
diff --git a/tests/Rector/MethodCall/EloquentWhereRelationTypeHintingParameterRector/Fixture/fixture3.php.inc b/tests/Rector/MethodCall/EloquentWhereRelationTypeHintingParameterRector/Fixture/fixture3.php.inc
deleted file mode 100644
index 6512cfe9..00000000
--- a/tests/Rector/MethodCall/EloquentWhereRelationTypeHintingParameterRector/Fixture/fixture3.php.inc
+++ /dev/null
@@ -1,29 +0,0 @@
-where('is_published', true);
-});
-
-?>
------
-where('is_published', true);
-});
-
-?>
diff --git a/tests/Rector/MethodCall/EloquentWhereRelationTypeHintingParameterRector/Fixture/skip_non_closure_argument.php.inc b/tests/Rector/MethodCall/EloquentWhereRelationTypeHintingParameterRector/Fixture/skip_non_closure_argument.php.inc
deleted file mode 100644
index 54bacbfb..00000000
--- a/tests/Rector/MethodCall/EloquentWhereRelationTypeHintingParameterRector/Fixture/skip_non_closure_argument.php.inc
+++ /dev/null
@@ -1,20 +0,0 @@
-whereHas('posts');
-$query->whereHas('posts', null);
-$query->whereHasMorph('posts', '', null);
-
-class User extends \Illuminate\Database\Eloquent\Model
-{
-
-}
-
-User::whereHas('posts');
-User::whereHas('posts', null);
-User::whereHasMorph('posts', '');
-User::whereHasMorph('posts', '', null);
-
-?>
diff --git a/tests/Rector/MethodCall/EloquentWhereRelationTypeHintingParameterRector/Fixture/skip_non_query_object.php.inc b/tests/Rector/MethodCall/EloquentWhereRelationTypeHintingParameterRector/Fixture/skip_non_query_object.php.inc
deleted file mode 100644
index 40b02090..00000000
--- a/tests/Rector/MethodCall/EloquentWhereRelationTypeHintingParameterRector/Fixture/skip_non_query_object.php.inc
+++ /dev/null
@@ -1,13 +0,0 @@
-whereHas('posts', fn ($query) =>
- $query->where('is_published', true)
-);
-
-RandomClass::whereHas('posts', fn ($query) =>
- $query->where('is_published', true)
-);
-
-?>
diff --git a/tests/Rector/MethodCall/EloquentWhereRelationTypeHintingParameterRector/config/configured_rule.php b/tests/Rector/MethodCall/EloquentWhereRelationTypeHintingParameterRector/config/configured_rule.php
deleted file mode 100644
index 648875bb..00000000
--- a/tests/Rector/MethodCall/EloquentWhereRelationTypeHintingParameterRector/config/configured_rule.php
+++ /dev/null
@@ -1,12 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
-
- $rectorConfig->rule(EloquentWhereRelationTypeHintingParameterRector::class);
-};
diff --git a/tests/Rector/MethodCall/EloquentWhereTypeHintClosureParameterRector/EloquentWhereTypeHintClosureParameterRectorTest.php b/tests/Rector/MethodCall/EloquentWhereTypeHintClosureParameterRector/EloquentWhereTypeHintClosureParameterRectorTest.php
deleted file mode 100644
index d7ffb1a2..00000000
--- a/tests/Rector/MethodCall/EloquentWhereTypeHintClosureParameterRector/EloquentWhereTypeHintClosureParameterRectorTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/MethodCall/EloquentWhereTypeHintClosureParameterRector/Fixture/fixture.php.inc b/tests/Rector/MethodCall/EloquentWhereTypeHintClosureParameterRector/Fixture/fixture.php.inc
deleted file mode 100644
index 83db6452..00000000
--- a/tests/Rector/MethodCall/EloquentWhereTypeHintClosureParameterRector/Fixture/fixture.php.inc
+++ /dev/null
@@ -1,23 +0,0 @@
-where(function ($query) {
- $query->where('id', 1)
- ->orWhere('id', 2);
-});
-
-?>
------
-where(function (\Illuminate\Contracts\Database\Query\Builder $query) {
- $query->where('id', 1)
- ->orWhere('id', 2);
-});
-
-?>
diff --git a/tests/Rector/MethodCall/EloquentWhereTypeHintClosureParameterRector/Fixture/fixture2.php.inc b/tests/Rector/MethodCall/EloquentWhereTypeHintClosureParameterRector/Fixture/fixture2.php.inc
deleted file mode 100644
index 28df259f..00000000
--- a/tests/Rector/MethodCall/EloquentWhereTypeHintClosureParameterRector/Fixture/fixture2.php.inc
+++ /dev/null
@@ -1,31 +0,0 @@
-where('id', 1)
- ->orWhere('id', 2);
-});
-
-?>
------
-where('id', 1)
- ->orWhere('id', 2);
-});
-
-?>
diff --git a/tests/Rector/MethodCall/EloquentWhereTypeHintClosureParameterRector/Fixture/fixture3.php.inc b/tests/Rector/MethodCall/EloquentWhereTypeHintClosureParameterRector/Fixture/fixture3.php.inc
deleted file mode 100644
index 1101654f..00000000
--- a/tests/Rector/MethodCall/EloquentWhereTypeHintClosureParameterRector/Fixture/fixture3.php.inc
+++ /dev/null
@@ -1,23 +0,0 @@
-where(fn ($query) =>
- $query->where('id', 1)
- ->orWhere('id', 2)
-);
-
-?>
------
-where(fn (\Illuminate\Contracts\Database\Query\Builder $query) =>
- $query->where('id', 1)
- ->orWhere('id', 2)
-);
-
-?>
diff --git a/tests/Rector/MethodCall/EloquentWhereTypeHintClosureParameterRector/Fixture/skip_non_closure_argument.php.inc b/tests/Rector/MethodCall/EloquentWhereTypeHintClosureParameterRector/Fixture/skip_non_closure_argument.php.inc
deleted file mode 100644
index 4dec9198..00000000
--- a/tests/Rector/MethodCall/EloquentWhereTypeHintClosureParameterRector/Fixture/skip_non_closure_argument.php.inc
+++ /dev/null
@@ -1,13 +0,0 @@
-where('name', 'a');
-
-class User extends \Illuminate\Database\Eloquent\Model
-{
-
-}
-
-User::where('name', 'a');
-
-?>
diff --git a/tests/Rector/MethodCall/EloquentWhereTypeHintClosureParameterRector/Fixture/skip_non_query_object.php.inc b/tests/Rector/MethodCall/EloquentWhereTypeHintClosureParameterRector/Fixture/skip_non_query_object.php.inc
deleted file mode 100644
index cc4a5614..00000000
--- a/tests/Rector/MethodCall/EloquentWhereTypeHintClosureParameterRector/Fixture/skip_non_query_object.php.inc
+++ /dev/null
@@ -1,13 +0,0 @@
-whereHas('posts', fn ($query) =>
- $query->where('is_published', true)
-);
-
-RandomClass::whereHas('posts', fn ($query) =>
- $query->where('is_published', true)
-);
-
-?>
diff --git a/tests/Rector/MethodCall/EloquentWhereTypeHintClosureParameterRector/config/configured_rule.php b/tests/Rector/MethodCall/EloquentWhereTypeHintClosureParameterRector/config/configured_rule.php
deleted file mode 100644
index a78b053a..00000000
--- a/tests/Rector/MethodCall/EloquentWhereTypeHintClosureParameterRector/config/configured_rule.php
+++ /dev/null
@@ -1,13 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
-
- $rectorConfig->rule(EloquentWhereTypeHintClosureParameterRector::class);
-};
diff --git a/tests/Rector/MethodCall/FactoryApplyingStatesRector/FactoryApplyingStatesRectorTest.php b/tests/Rector/MethodCall/FactoryApplyingStatesRector/FactoryApplyingStatesRectorTest.php
deleted file mode 100644
index 4c415894..00000000
--- a/tests/Rector/MethodCall/FactoryApplyingStatesRector/FactoryApplyingStatesRectorTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/MethodCall/FactoryApplyingStatesRector/Fixture/fixture.php.inc b/tests/Rector/MethodCall/FactoryApplyingStatesRector/Fixture/fixture.php.inc
deleted file mode 100644
index a472ce83..00000000
--- a/tests/Rector/MethodCall/FactoryApplyingStatesRector/Fixture/fixture.php.inc
+++ /dev/null
@@ -1,23 +0,0 @@
-states([]);
-$factory->state('delinquent');
-$factory->states('delinquent');
-$factory->states('premium', 'delinquent');
-
-?>
------
-delinquent();
-$factory->delinquent();
-$factory->premium()->delinquent();
-
-?>
diff --git a/tests/Rector/MethodCall/FactoryApplyingStatesRector/config/configured_rule.php b/tests/Rector/MethodCall/FactoryApplyingStatesRector/config/configured_rule.php
deleted file mode 100644
index c81f6292..00000000
--- a/tests/Rector/MethodCall/FactoryApplyingStatesRector/config/configured_rule.php
+++ /dev/null
@@ -1,13 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
-
- $rectorConfig->rule(FactoryApplyingStatesRector::class);
-};
diff --git a/tests/Rector/MethodCall/LumenRoutesStringActionToUsesArrayRector/Fixture/routes_action_string.php.inc b/tests/Rector/MethodCall/LumenRoutesStringActionToUsesArrayRector/Fixture/routes_action_string.php.inc
deleted file mode 100644
index 288657d5..00000000
--- a/tests/Rector/MethodCall/LumenRoutesStringActionToUsesArrayRector/Fixture/routes_action_string.php.inc
+++ /dev/null
@@ -1,17 +0,0 @@
-get('/', 'HomeController@home');
-
-?>
------
-get('/', ['uses' => 'HomeController@home']);
-
-?>
diff --git a/tests/Rector/MethodCall/LumenRoutesStringActionToUsesArrayRector/Fixture/skip_routes_action_anonymous_function.php.inc b/tests/Rector/MethodCall/LumenRoutesStringActionToUsesArrayRector/Fixture/skip_routes_action_anonymous_function.php.inc
deleted file mode 100644
index b67cd7e3..00000000
--- a/tests/Rector/MethodCall/LumenRoutesStringActionToUsesArrayRector/Fixture/skip_routes_action_anonymous_function.php.inc
+++ /dev/null
@@ -1,10 +0,0 @@
-get('foo', function () {
- return 'Hello World';
-});
-
-?>
diff --git a/tests/Rector/MethodCall/LumenRoutesStringActionToUsesArrayRector/Fixture/skip_routes_action_array.php.inc b/tests/Rector/MethodCall/LumenRoutesStringActionToUsesArrayRector/Fixture/skip_routes_action_array.php.inc
deleted file mode 100644
index 41bfa4c0..00000000
--- a/tests/Rector/MethodCall/LumenRoutesStringActionToUsesArrayRector/Fixture/skip_routes_action_array.php.inc
+++ /dev/null
@@ -1,8 +0,0 @@
-get('foo', []);
-
-?>
diff --git a/tests/Rector/MethodCall/LumenRoutesStringActionToUsesArrayRector/LumenRoutesStringActionToUsesArrayRectorTest.php b/tests/Rector/MethodCall/LumenRoutesStringActionToUsesArrayRector/LumenRoutesStringActionToUsesArrayRectorTest.php
deleted file mode 100644
index c96a4337..00000000
--- a/tests/Rector/MethodCall/LumenRoutesStringActionToUsesArrayRector/LumenRoutesStringActionToUsesArrayRectorTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/MethodCall/LumenRoutesStringActionToUsesArrayRector/config/configured_rule.php b/tests/Rector/MethodCall/LumenRoutesStringActionToUsesArrayRector/config/configured_rule.php
deleted file mode 100644
index f7e10cab..00000000
--- a/tests/Rector/MethodCall/LumenRoutesStringActionToUsesArrayRector/config/configured_rule.php
+++ /dev/null
@@ -1,12 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
-
- $rectorConfig->rule(LumenRoutesStringActionToUsesArrayRector::class);
-};
diff --git a/tests/Rector/MethodCall/LumenRoutesStringMiddlewareToArrayRector/Fixture/group_method_middleware_not_an_array.php.inc b/tests/Rector/MethodCall/LumenRoutesStringMiddlewareToArrayRector/Fixture/group_method_middleware_not_an_array.php.inc
deleted file mode 100644
index 4b4f5dd5..00000000
--- a/tests/Rector/MethodCall/LumenRoutesStringMiddlewareToArrayRector/Fixture/group_method_middleware_not_an_array.php.inc
+++ /dev/null
@@ -1,21 +0,0 @@
-group(['middleware' => 'auth'], function () use ($router) {
- $router->get('/', 'HomeController@home');
-});
-
-?>
------
-group(['middleware' => ['auth']], function () use ($router) {
- $router->get('/', 'HomeController@home');
-});
-
-?>
diff --git a/tests/Rector/MethodCall/LumenRoutesStringMiddlewareToArrayRector/Fixture/routes_method_middleware_not_an_array.php.inc b/tests/Rector/MethodCall/LumenRoutesStringMiddlewareToArrayRector/Fixture/routes_method_middleware_not_an_array.php.inc
deleted file mode 100644
index 22c9dd0f..00000000
--- a/tests/Rector/MethodCall/LumenRoutesStringMiddlewareToArrayRector/Fixture/routes_method_middleware_not_an_array.php.inc
+++ /dev/null
@@ -1,27 +0,0 @@
-get('/', ['uses' => 'HomeController@home', 'middleware' => 'auth']);
-$router->post('/', ['uses' => 'HomeController@home', 'middleware' => 'auth']);
-$router->put('/', ['uses' => 'HomeController@home', 'middleware' => 'auth']);
-$router->delete('/', ['uses' => 'HomeController@home', 'middleware' => 'auth']);
-$router->options('/', ['uses' => 'HomeController@home', 'middleware' => 'auth']);
-$router->patch('/', ['uses' => 'HomeController@home', 'middleware' => 'auth']);
-
-?>
------
-get('/', ['uses' => 'HomeController@home', 'middleware' => ['auth']]);
-$router->post('/', ['uses' => 'HomeController@home', 'middleware' => ['auth']]);
-$router->put('/', ['uses' => 'HomeController@home', 'middleware' => ['auth']]);
-$router->delete('/', ['uses' => 'HomeController@home', 'middleware' => ['auth']]);
-$router->options('/', ['uses' => 'HomeController@home', 'middleware' => ['auth']]);
-$router->patch('/', ['uses' => 'HomeController@home', 'middleware' => ['auth']]);
-
-?>
diff --git a/tests/Rector/MethodCall/LumenRoutesStringMiddlewareToArrayRector/Fixture/routes_method_middleware_string_array_notation.php.inc b/tests/Rector/MethodCall/LumenRoutesStringMiddlewareToArrayRector/Fixture/routes_method_middleware_string_array_notation.php.inc
deleted file mode 100644
index c76fca30..00000000
--- a/tests/Rector/MethodCall/LumenRoutesStringMiddlewareToArrayRector/Fixture/routes_method_middleware_string_array_notation.php.inc
+++ /dev/null
@@ -1,21 +0,0 @@
-group(['middleware' => 'first|second'], function () use ($router) {
- $router->get('/', ['uses' => 'HomeController@home', 'middleware' => 'third|fourth']);
-});
-
-?>
------
-group(['middleware' => ['first', 'second']], function () use ($router) {
- $router->get('/', ['uses' => 'HomeController@home', 'middleware' => ['third', 'fourth']]);
-});
-
-?>
diff --git a/tests/Rector/MethodCall/LumenRoutesStringMiddlewareToArrayRector/Fixture/skip_group_method_middleware_an_array.php.inc b/tests/Rector/MethodCall/LumenRoutesStringMiddlewareToArrayRector/Fixture/skip_group_method_middleware_an_array.php.inc
deleted file mode 100644
index a64d6238..00000000
--- a/tests/Rector/MethodCall/LumenRoutesStringMiddlewareToArrayRector/Fixture/skip_group_method_middleware_an_array.php.inc
+++ /dev/null
@@ -1,10 +0,0 @@
-group(['middleware' => ['auth']], function () use ($router) {
- $router->get('/', 'HomeController@home');
-});
-
-?>
diff --git a/tests/Rector/MethodCall/LumenRoutesStringMiddlewareToArrayRector/Fixture/skip_routes_method_middleware_an_array.php.inc b/tests/Rector/MethodCall/LumenRoutesStringMiddlewareToArrayRector/Fixture/skip_routes_method_middleware_an_array.php.inc
deleted file mode 100644
index 4b385f7a..00000000
--- a/tests/Rector/MethodCall/LumenRoutesStringMiddlewareToArrayRector/Fixture/skip_routes_method_middleware_an_array.php.inc
+++ /dev/null
@@ -1,13 +0,0 @@
-get('/', ['uses' => 'HomeController@home', 'middleware' => ['auth']]);
-$router->post('/', ['uses' => 'HomeController@home', 'middleware' => ['auth']]);
-$router->put('/', ['uses' => 'HomeController@home', 'middleware' => ['auth']]);
-$router->delete('/', ['uses' => 'HomeController@home', 'middleware' => ['auth']]);
-$router->options('/', ['uses' => 'HomeController@home', 'middleware' => ['auth']]);
-$router->patch('/', ['uses' => 'HomeController@home', 'middleware' => ['auth']]);
-
-?>
diff --git a/tests/Rector/MethodCall/LumenRoutesStringMiddlewareToArrayRector/LumenRoutesStringMiddlewareToArrayRectorTest.php b/tests/Rector/MethodCall/LumenRoutesStringMiddlewareToArrayRector/LumenRoutesStringMiddlewareToArrayRectorTest.php
deleted file mode 100644
index 28849523..00000000
--- a/tests/Rector/MethodCall/LumenRoutesStringMiddlewareToArrayRector/LumenRoutesStringMiddlewareToArrayRectorTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/MethodCall/LumenRoutesStringMiddlewareToArrayRector/config/configured_rule.php b/tests/Rector/MethodCall/LumenRoutesStringMiddlewareToArrayRector/config/configured_rule.php
deleted file mode 100644
index cdc53ba7..00000000
--- a/tests/Rector/MethodCall/LumenRoutesStringMiddlewareToArrayRector/config/configured_rule.php
+++ /dev/null
@@ -1,12 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
-
- $rectorConfig->rule(LumenRoutesStringMiddlewareToArrayRector::class);
-};
diff --git a/tests/Rector/MethodCall/RedirectBackToBackHelperRector/Fixture/fixture.php.inc b/tests/Rector/MethodCall/RedirectBackToBackHelperRector/Fixture/fixture.php.inc
deleted file mode 100644
index fc5b8301..00000000
--- a/tests/Rector/MethodCall/RedirectBackToBackHelperRector/Fixture/fixture.php.inc
+++ /dev/null
@@ -1,41 +0,0 @@
-back()->with('error', 'Incorrect credential.');
- }
-
- public function update()
- {
- return Redirect::back()->with('error', 'Incorrect credential.');
- }
-}
-
-?>
------
-with('error', 'Incorrect credential.');
- }
-
- public function update()
- {
- return back()->with('error', 'Incorrect credential.');
- }
-}
-
-?>
diff --git a/tests/Rector/MethodCall/RedirectBackToBackHelperRector/Fixture/fixture_with_argument.php.inc b/tests/Rector/MethodCall/RedirectBackToBackHelperRector/Fixture/fixture_with_argument.php.inc
deleted file mode 100644
index 31d16db5..00000000
--- a/tests/Rector/MethodCall/RedirectBackToBackHelperRector/Fixture/fixture_with_argument.php.inc
+++ /dev/null
@@ -1,41 +0,0 @@
-back(302);
- }
-
- public function update()
- {
- return Redirect::back(302);
- }
-}
-
-?>
------
-
diff --git a/tests/Rector/MethodCall/RedirectBackToBackHelperRector/Fixture/fixture_without_with.php.inc b/tests/Rector/MethodCall/RedirectBackToBackHelperRector/Fixture/fixture_without_with.php.inc
deleted file mode 100644
index eaebdbae..00000000
--- a/tests/Rector/MethodCall/RedirectBackToBackHelperRector/Fixture/fixture_without_with.php.inc
+++ /dev/null
@@ -1,41 +0,0 @@
-back();
- }
-
- public function update()
- {
- return Redirect::back();
- }
-}
-
-?>
------
-
diff --git a/tests/Rector/MethodCall/RedirectBackToBackHelperRector/Fixture/skip_with_arguments.php.inc b/tests/Rector/MethodCall/RedirectBackToBackHelperRector/Fixture/skip_with_arguments.php.inc
deleted file mode 100644
index bc0348f2..00000000
--- a/tests/Rector/MethodCall/RedirectBackToBackHelperRector/Fixture/skip_with_arguments.php.inc
+++ /dev/null
@@ -1,13 +0,0 @@
-back()->with('error', 'Incorrect credential.');
- }
-}
-
-?>
diff --git a/tests/Rector/MethodCall/RedirectBackToBackHelperRector/Fixture/skip_with_object_call.php.inc b/tests/Rector/MethodCall/RedirectBackToBackHelperRector/Fixture/skip_with_object_call.php.inc
deleted file mode 100644
index 6427cf1c..00000000
--- a/tests/Rector/MethodCall/RedirectBackToBackHelperRector/Fixture/skip_with_object_call.php.inc
+++ /dev/null
@@ -1,15 +0,0 @@
-back()->with('error', 'Incorrect credential.');
- }
-}
-
-?>
diff --git a/tests/Rector/MethodCall/RedirectBackToBackHelperRector/Fixture/skip_with_only_back.php.inc b/tests/Rector/MethodCall/RedirectBackToBackHelperRector/Fixture/skip_with_only_back.php.inc
deleted file mode 100644
index 88b173fc..00000000
--- a/tests/Rector/MethodCall/RedirectBackToBackHelperRector/Fixture/skip_with_only_back.php.inc
+++ /dev/null
@@ -1,13 +0,0 @@
-with('error', 'Incorrect credential.');
- }
-}
-
-?>
diff --git a/tests/Rector/MethodCall/RedirectBackToBackHelperRector/RedirectBackToBackHelperRectorTest.php b/tests/Rector/MethodCall/RedirectBackToBackHelperRector/RedirectBackToBackHelperRectorTest.php
deleted file mode 100644
index ea6b819e..00000000
--- a/tests/Rector/MethodCall/RedirectBackToBackHelperRector/RedirectBackToBackHelperRectorTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/MethodCall/RedirectBackToBackHelperRector/config/configured_rule.php b/tests/Rector/MethodCall/RedirectBackToBackHelperRector/config/configured_rule.php
deleted file mode 100644
index d1285ae5..00000000
--- a/tests/Rector/MethodCall/RedirectBackToBackHelperRector/config/configured_rule.php
+++ /dev/null
@@ -1,13 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
-
- $rectorConfig->rule(RedirectBackToBackHelperRector::class);
-};
diff --git a/tests/Rector/MethodCall/RedirectRouteToToRouteHelperRector/Fixture/fixture.php.inc b/tests/Rector/MethodCall/RedirectRouteToToRouteHelperRector/Fixture/fixture.php.inc
deleted file mode 100644
index 2d8c9d1b..00000000
--- a/tests/Rector/MethodCall/RedirectRouteToToRouteHelperRector/Fixture/fixture.php.inc
+++ /dev/null
@@ -1,41 +0,0 @@
-route('home')->with('error', 'Incorrect credential.');
- }
-
- public function update()
- {
- return Redirect::route('home')->with('error', 'Incorrect credential.');
- }
-}
-
-?>
------
-with('error', 'Incorrect credential.');
- }
-
- public function update()
- {
- return to_route('home')->with('error', 'Incorrect credential.');
- }
-}
-
-?>
diff --git a/tests/Rector/MethodCall/RedirectRouteToToRouteHelperRector/Fixture/fixture_without_with.php.inc b/tests/Rector/MethodCall/RedirectRouteToToRouteHelperRector/Fixture/fixture_without_with.php.inc
deleted file mode 100644
index ab0c28b3..00000000
--- a/tests/Rector/MethodCall/RedirectRouteToToRouteHelperRector/Fixture/fixture_without_with.php.inc
+++ /dev/null
@@ -1,41 +0,0 @@
-route('home');
- }
-
- public function update()
- {
- return Redirect::route('home');
- }
-}
-
-?>
------
-
diff --git a/tests/Rector/MethodCall/RedirectRouteToToRouteHelperRector/Fixture/skip_with_object_call.php.inc b/tests/Rector/MethodCall/RedirectRouteToToRouteHelperRector/Fixture/skip_with_object_call.php.inc
deleted file mode 100644
index d2989286..00000000
--- a/tests/Rector/MethodCall/RedirectRouteToToRouteHelperRector/Fixture/skip_with_object_call.php.inc
+++ /dev/null
@@ -1,15 +0,0 @@
-route('home')->with('error', 'Incorrect credential.');
- }
-}
-
-?>
diff --git a/tests/Rector/MethodCall/RedirectRouteToToRouteHelperRector/Fixture/skip_with_only_back.php.inc b/tests/Rector/MethodCall/RedirectRouteToToRouteHelperRector/Fixture/skip_with_only_back.php.inc
deleted file mode 100644
index 1f20c6f4..00000000
--- a/tests/Rector/MethodCall/RedirectRouteToToRouteHelperRector/Fixture/skip_with_only_back.php.inc
+++ /dev/null
@@ -1,13 +0,0 @@
-with('error', 'Incorrect credential.');
- }
-}
-
-?>
diff --git a/tests/Rector/MethodCall/RedirectRouteToToRouteHelperRector/RedirectRouteToToRouteHelperRectorTest.php b/tests/Rector/MethodCall/RedirectRouteToToRouteHelperRector/RedirectRouteToToRouteHelperRectorTest.php
deleted file mode 100644
index c6733ee7..00000000
--- a/tests/Rector/MethodCall/RedirectRouteToToRouteHelperRector/RedirectRouteToToRouteHelperRectorTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/MethodCall/RedirectRouteToToRouteHelperRector/config/configured_rule.php b/tests/Rector/MethodCall/RedirectRouteToToRouteHelperRector/config/configured_rule.php
deleted file mode 100644
index 066c7e0b..00000000
--- a/tests/Rector/MethodCall/RedirectRouteToToRouteHelperRector/config/configured_rule.php
+++ /dev/null
@@ -1,13 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
-
- $rectorConfig->rule(RedirectRouteToToRouteHelperRector::class);
-};
diff --git a/tests/Rector/MethodCall/UseComponentPropertyWithinCommandsRector/Fixture/fixture.php.inc b/tests/Rector/MethodCall/UseComponentPropertyWithinCommandsRector/Fixture/fixture.php.inc
deleted file mode 100644
index d0378615..00000000
--- a/tests/Rector/MethodCall/UseComponentPropertyWithinCommandsRector/Fixture/fixture.php.inc
+++ /dev/null
@@ -1,57 +0,0 @@
-ask('What is your name?');
- $this->line('Thank you!');
- $this->info('Thank you!');
- $this->error('Thank you!');
- $this->warn('Thank you!');
- $this->confirm('Thank you!');
- $this->askWithCompletion('Thank you!');
- $this->choice('Thank you!');
- $this->alert('Thank you!');
- }
-
- public function test()
- {
- $this->ask('What is your name?');
- }
-}
-
-?>
------
-components->ask('What is your name?');
- $this->components->line('Thank you!');
- $this->components->info('Thank you!');
- $this->components->error('Thank you!');
- $this->components->warn('Thank you!');
- $this->components->confirm('Thank you!');
- $this->components->askWithCompletion('Thank you!');
- $this->components->choice('Thank you!');
- $this->components->alert('Thank you!');
- }
-
- public function test()
- {
- $this->components->ask('What is your name?');
- }
-}
-
-?>
diff --git a/tests/Rector/MethodCall/UseComponentPropertyWithinCommandsRector/Fixture/skip_non_command_extending_classes.php.inc b/tests/Rector/MethodCall/UseComponentPropertyWithinCommandsRector/Fixture/skip_non_command_extending_classes.php.inc
deleted file mode 100644
index ccc57d2c..00000000
--- a/tests/Rector/MethodCall/UseComponentPropertyWithinCommandsRector/Fixture/skip_non_command_extending_classes.php.inc
+++ /dev/null
@@ -1,27 +0,0 @@
-ask('What is your name?');
- }
-}
-
-?>
------
-ask('What is your name?');
- }
-}
-
-?>
diff --git a/tests/Rector/MethodCall/UseComponentPropertyWithinCommandsRector/Fixture/skip_non_component_methods.php.inc b/tests/Rector/MethodCall/UseComponentPropertyWithinCommandsRector/Fixture/skip_non_component_methods.php.inc
deleted file mode 100644
index e7d6b80c..00000000
--- a/tests/Rector/MethodCall/UseComponentPropertyWithinCommandsRector/Fixture/skip_non_component_methods.php.inc
+++ /dev/null
@@ -1,31 +0,0 @@
-test();
- }
-}
-
-?>
------
-test();
- }
-}
-
-?>
diff --git a/tests/Rector/MethodCall/UseComponentPropertyWithinCommandsRector/UseComponentPropertyWithinCommandsRectorTest.php b/tests/Rector/MethodCall/UseComponentPropertyWithinCommandsRector/UseComponentPropertyWithinCommandsRectorTest.php
deleted file mode 100644
index 39d6fb58..00000000
--- a/tests/Rector/MethodCall/UseComponentPropertyWithinCommandsRector/UseComponentPropertyWithinCommandsRectorTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/MethodCall/UseComponentPropertyWithinCommandsRector/config/configured_rule.php b/tests/Rector/MethodCall/UseComponentPropertyWithinCommandsRector/config/configured_rule.php
deleted file mode 100644
index 08a1a4ee..00000000
--- a/tests/Rector/MethodCall/UseComponentPropertyWithinCommandsRector/config/configured_rule.php
+++ /dev/null
@@ -1,13 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
-
- $rectorConfig->rule(UseComponentPropertyWithinCommandsRector::class);
-};
diff --git a/tests/Rector/Namespace_/FactoryDefinitionRector/FactoryDefinitionRectorTest.php b/tests/Rector/Namespace_/FactoryDefinitionRector/FactoryDefinitionRectorTest.php
deleted file mode 100644
index 3493b4c5..00000000
--- a/tests/Rector/Namespace_/FactoryDefinitionRector/FactoryDefinitionRectorTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/Namespace_/FactoryDefinitionRector/Fixture/fixture.php.inc b/tests/Rector/Namespace_/FactoryDefinitionRector/Fixture/fixture.php.inc
deleted file mode 100644
index 9a0b84a5..00000000
--- a/tests/Rector/Namespace_/FactoryDefinitionRector/Fixture/fixture.php.inc
+++ /dev/null
@@ -1,77 +0,0 @@
-define(Model::class, function ($faker) {
- return [
- 'name' => $faker->name,
- 'email' => $faker->unique()->safeEmail,
- 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
- ];
-});
-
-$factory->state(Model::class, 'address', function ($faker) {
- return [
- 'address' => $faker->address,
- ];
-});
-
-$factory->state(Model::class, 'delinquent', [
- 'account_status' => 'delinquent',
-]);
-
-$factory->afterMaking(Model::class, function (Model $user, $faker) {
- $user->name = $faker->name;
-});
-
-$factory->afterCreating(Model::class, function ($user, $faker) {
- $user->name = $faker->name;
- $user->accounts()->save(factory(\App\Account::class)->make());
-});
-
-?>
------
- $this->faker->name,
- 'email' => $this->faker->unique()->safeEmail,
- 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
- ];
- }
- public function address()
- {
- return $this->state(function () {
- return [
- 'address' => $this->faker->address,
- ];
- });
- }
- public function delinquent()
- {
- return $this->state([
- 'account_status' => 'delinquent',
- ]);
- }
- public function configure()
- {
- return $this->afterMaking(function (Model $user) {
- $user->name = $this->faker->name;
- })->afterCreating(function ($user) {
- $user->name = $this->faker->name;
- $user->accounts()->save(factory(\App\Account::class)->make());
- });
- }
-}
-
-?>
diff --git a/tests/Rector/Namespace_/FactoryDefinitionRector/Fixture/mutli_definition.php.inc b/tests/Rector/Namespace_/FactoryDefinitionRector/Fixture/mutli_definition.php.inc
deleted file mode 100644
index 60b93583..00000000
--- a/tests/Rector/Namespace_/FactoryDefinitionRector/Fixture/mutli_definition.php.inc
+++ /dev/null
@@ -1,61 +0,0 @@
-define(User::class, function (\Faker\Generator $faker) {
- return [
- 'name' => $faker->name,
- 'email' => $faker->unique()->safeEmail,
- 'email_verified_at' => now(),
- 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
- 'remember_token' => Str::random(10),
- ];
-});
-
-$factory->define(Account::class, function (\Faker\Generator $faker) {
- return [
- 'account' => Str::random(10),
- ];
-});
-
-?>
------
- $this->faker->name,
- 'email' => $this->faker->unique()->safeEmail,
- 'email_verified_at' => now(),
- 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
- 'remember_token' => Str::random(10),
- ];
- }
-}
-
-class AccountFactory extends \Illuminate\Database\Eloquent\Factories\Factory
-{
- protected $model = Account::class;
- public function definition()
- {
- return [
- 'account' => Str::random(10),
- ];
- }
-}
-
-?>
diff --git a/tests/Rector/Namespace_/FactoryDefinitionRector/Fixture/skip_reassign_factory.php.inc b/tests/Rector/Namespace_/FactoryDefinitionRector/Fixture/skip_reassign_factory.php.inc
deleted file mode 100644
index 11e947c3..00000000
--- a/tests/Rector/Namespace_/FactoryDefinitionRector/Fixture/skip_reassign_factory.php.inc
+++ /dev/null
@@ -1,23 +0,0 @@
-define(\App\User::class, function (\Faker\Generator $faker) {
- return [];
-});
-
-?>
------
-define(\App\User::class, function (\Faker\Generator $faker) {
- return [];
-});
-
-?>
diff --git a/tests/Rector/Namespace_/FactoryDefinitionRector/Fixture/without_args.php.inc b/tests/Rector/Namespace_/FactoryDefinitionRector/Fixture/without_args.php.inc
deleted file mode 100644
index 9e483649..00000000
--- a/tests/Rector/Namespace_/FactoryDefinitionRector/Fixture/without_args.php.inc
+++ /dev/null
@@ -1,53 +0,0 @@
-define(Model::class, function () {
- // ...
-});
-
-$factory->state(Model::class, 'address', function () {
- // ...
-});
-
-$factory->afterMaking(Model::class, function (Model $user) {
- // ...
-});
-
-$factory->afterCreating(Model::class, function () {
- // ...
-});
-
-?>
------
-state(function () {
- // ...
- });
- }
- public function configure()
- {
- return $this->afterMaking(function (Model $user) {
- // ...
- })->afterCreating(function () {
- // ...
- });
- }
-}
-
-?>
diff --git a/tests/Rector/Namespace_/FactoryDefinitionRector/Fixture/without_namespace.php.inc b/tests/Rector/Namespace_/FactoryDefinitionRector/Fixture/without_namespace.php.inc
deleted file mode 100644
index e3d23ec1..00000000
--- a/tests/Rector/Namespace_/FactoryDefinitionRector/Fixture/without_namespace.php.inc
+++ /dev/null
@@ -1,30 +0,0 @@
-define(RectorLaravel\Tests\Rector\Namespace_\FactoryDefinitionRector\Source\Model::class, function ($faker) {
- return [
- 'name' => $faker->name,
- 'email' => $faker->unique()->safeEmail,
- ];
-});
-
-?>
------
- $this->faker->name,
- 'email' => $this->faker->unique()->safeEmail,
- ];
- }
-}
-
-?>
diff --git a/tests/Rector/Namespace_/FactoryDefinitionRector/Source/Model.php b/tests/Rector/Namespace_/FactoryDefinitionRector/Source/Model.php
deleted file mode 100644
index f116d54e..00000000
--- a/tests/Rector/Namespace_/FactoryDefinitionRector/Source/Model.php
+++ /dev/null
@@ -1,8 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
-
- $rectorConfig->rule(FactoryDefinitionRector::class);
-};
diff --git a/tests/Rector/New_/AddGuardToLoginEventRector/AddGuardToLoginEventRectorTest.php b/tests/Rector/New_/AddGuardToLoginEventRector/AddGuardToLoginEventRectorTest.php
deleted file mode 100644
index d141bc38..00000000
--- a/tests/Rector/New_/AddGuardToLoginEventRector/AddGuardToLoginEventRectorTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/New_/AddGuardToLoginEventRector/Fixture/fixture.php.inc b/tests/Rector/New_/AddGuardToLoginEventRector/Fixture/fixture.php.inc
deleted file mode 100644
index ea972771..00000000
--- a/tests/Rector/New_/AddGuardToLoginEventRector/Fixture/fixture.php.inc
+++ /dev/null
@@ -1,32 +0,0 @@
-
------
-
diff --git a/tests/Rector/New_/AddGuardToLoginEventRector/Fixture/skip_already.php.inc b/tests/Rector/New_/AddGuardToLoginEventRector/Fixture/skip_already.php.inc
deleted file mode 100644
index 07844356..00000000
--- a/tests/Rector/New_/AddGuardToLoginEventRector/Fixture/skip_already.php.inc
+++ /dev/null
@@ -1,13 +0,0 @@
-
------
-
diff --git a/tests/Rector/New_/AddGuardToLoginEventRector/config/configured_rule.php b/tests/Rector/New_/AddGuardToLoginEventRector/config/configured_rule.php
deleted file mode 100644
index 67547bf3..00000000
--- a/tests/Rector/New_/AddGuardToLoginEventRector/config/configured_rule.php
+++ /dev/null
@@ -1,13 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
-
- $rectorConfig->rule(AddGuardToLoginEventRector::class);
-};
diff --git a/tests/Rector/PropertyFetch/OptionalToNullsafeOperatorRector/Fixture/fixture.php.inc b/tests/Rector/PropertyFetch/OptionalToNullsafeOperatorRector/Fixture/fixture.php.inc
deleted file mode 100644
index 48a6447d..00000000
--- a/tests/Rector/PropertyFetch/OptionalToNullsafeOperatorRector/Fixture/fixture.php.inc
+++ /dev/null
@@ -1,23 +0,0 @@
-something();
-optional($value)->something(true);
-optional($value)->foo;
-optional(request()->user())->getKey();
-
-?>
------
-something();
-$value?->something(true);
-$value?->foo;
-request()->user()?->getKey();
-
-?>
diff --git a/tests/Rector/PropertyFetch/OptionalToNullsafeOperatorRector/Fixture/skip_callback.php.inc b/tests/Rector/PropertyFetch/OptionalToNullsafeOperatorRector/Fixture/skip_callback.php.inc
deleted file mode 100644
index 5c29e22b..00000000
--- a/tests/Rector/PropertyFetch/OptionalToNullsafeOperatorRector/Fixture/skip_callback.php.inc
+++ /dev/null
@@ -1,10 +0,0 @@
-something();
diff --git a/tests/Rector/PropertyFetch/OptionalToNullsafeOperatorRector/Fixture/skip_macro_methods.php.inc b/tests/Rector/PropertyFetch/OptionalToNullsafeOperatorRector/Fixture/skip_macro_methods.php.inc
deleted file mode 100644
index bfcd05da..00000000
--- a/tests/Rector/PropertyFetch/OptionalToNullsafeOperatorRector/Fixture/skip_macro_methods.php.inc
+++ /dev/null
@@ -1,17 +0,0 @@
-present()->something();
-
-?>
------
-present()->something();
-
-?>
diff --git a/tests/Rector/PropertyFetch/OptionalToNullsafeOperatorRector/Fixture/skip_values.php.inc b/tests/Rector/PropertyFetch/OptionalToNullsafeOperatorRector/Fixture/skip_values.php.inc
deleted file mode 100644
index df26b9f4..00000000
--- a/tests/Rector/PropertyFetch/OptionalToNullsafeOperatorRector/Fixture/skip_values.php.inc
+++ /dev/null
@@ -1,27 +0,0 @@
-something();
-optional(null)->something();
-optional(5)->something();
-optional(['present' => 'here'])->missing;
-optional((object) ['foo' => 'bar'])->foo;
-optional((object) ['foo' => 'bar'])->bar;
-
-?>
------
-something();
-optional(null)->something();
-optional(5)->something();
-optional(['present' => 'here'])->missing;
-((object) ['foo' => 'bar'])?->foo;
-((object) ['foo' => 'bar'])?->bar;
-
-?>
diff --git a/tests/Rector/PropertyFetch/OptionalToNullsafeOperatorRector/OptionalToNullsafeOperatorRectorTest.php b/tests/Rector/PropertyFetch/OptionalToNullsafeOperatorRector/OptionalToNullsafeOperatorRectorTest.php
deleted file mode 100644
index 6fa85b1c..00000000
--- a/tests/Rector/PropertyFetch/OptionalToNullsafeOperatorRector/OptionalToNullsafeOperatorRectorTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/PropertyFetch/OptionalToNullsafeOperatorRector/Source/SomeClass.php b/tests/Rector/PropertyFetch/OptionalToNullsafeOperatorRector/Source/SomeClass.php
deleted file mode 100644
index 2079826d..00000000
--- a/tests/Rector/PropertyFetch/OptionalToNullsafeOperatorRector/Source/SomeClass.php
+++ /dev/null
@@ -1,13 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
- $rectorConfig->ruleWithConfiguration(
- OptionalToNullsafeOperatorRector::class,
- [
- OptionalToNullsafeOperatorRector::EXCLUDE_METHODS => ['present'],
- ],
- );
-};
diff --git a/tests/Rector/PropertyFetch/ReplaceFakerInstanceWithHelperRector/Fixture/fixture.php.inc b/tests/Rector/PropertyFetch/ReplaceFakerInstanceWithHelperRector/Fixture/fixture.php.inc
deleted file mode 100644
index e8819e31..00000000
--- a/tests/Rector/PropertyFetch/ReplaceFakerInstanceWithHelperRector/Fixture/fixture.php.inc
+++ /dev/null
@@ -1,33 +0,0 @@
- $this->faker->name,
- 'email' => $this->faker->unique()->safeEmail,
- 'another_name' => $this->faker->name(),
- 'another_email' => $this->faker->unique()->safeEmail(),
- ];
- }
-}
-?>
------
- fake()->name,
- 'email' => fake()->unique()->safeEmail,
- 'another_name' => fake()->name(),
- 'another_email' => fake()->unique()->safeEmail(),
- ];
- }
-}
-?>
diff --git a/tests/Rector/PropertyFetch/ReplaceFakerInstanceWithHelperRector/Fixture/skip_already.php.inc b/tests/Rector/PropertyFetch/ReplaceFakerInstanceWithHelperRector/Fixture/skip_already.php.inc
deleted file mode 100644
index e229948e..00000000
--- a/tests/Rector/PropertyFetch/ReplaceFakerInstanceWithHelperRector/Fixture/skip_already.php.inc
+++ /dev/null
@@ -1,15 +0,0 @@
- fake()->name,
- 'email' => fake()->unique()->safeEmail,
- 'test' => $this->test,
- ];
- }
-}
diff --git a/tests/Rector/PropertyFetch/ReplaceFakerInstanceWithHelperRector/Fixture/skip_other_than_model_factories.php.inc b/tests/Rector/PropertyFetch/ReplaceFakerInstanceWithHelperRector/Fixture/skip_other_than_model_factories.php.inc
deleted file mode 100644
index 14a3e317..00000000
--- a/tests/Rector/PropertyFetch/ReplaceFakerInstanceWithHelperRector/Fixture/skip_other_than_model_factories.php.inc
+++ /dev/null
@@ -1,12 +0,0 @@
- $this->faker->name,
- 'email' => $this->faker->unique()->safeEmail,
- ];
- }
-}
diff --git a/tests/Rector/PropertyFetch/ReplaceFakerInstanceWithHelperRector/Fixture/skip_spatie_enum_helper.php.inc b/tests/Rector/PropertyFetch/ReplaceFakerInstanceWithHelperRector/Fixture/skip_spatie_enum_helper.php.inc
deleted file mode 100644
index 29b27edb..00000000
--- a/tests/Rector/PropertyFetch/ReplaceFakerInstanceWithHelperRector/Fixture/skip_spatie_enum_helper.php.inc
+++ /dev/null
@@ -1,13 +0,0 @@
- $this->faker->randomEnum(SomeEnum::class),
- ];
- }
-}
diff --git a/tests/Rector/PropertyFetch/ReplaceFakerInstanceWithHelperRector/ReplaceFakerInstanceWithHelperRectorTest.php b/tests/Rector/PropertyFetch/ReplaceFakerInstanceWithHelperRector/ReplaceFakerInstanceWithHelperRectorTest.php
deleted file mode 100644
index d3cfa4c6..00000000
--- a/tests/Rector/PropertyFetch/ReplaceFakerInstanceWithHelperRector/ReplaceFakerInstanceWithHelperRectorTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/PropertyFetch/ReplaceFakerInstanceWithHelperRector/config/configured_rule.php b/tests/Rector/PropertyFetch/ReplaceFakerInstanceWithHelperRector/config/configured_rule.php
deleted file mode 100644
index 245e8c65..00000000
--- a/tests/Rector/PropertyFetch/ReplaceFakerInstanceWithHelperRector/config/configured_rule.php
+++ /dev/null
@@ -1,12 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
-
- $rectorConfig->rule(ReplaceFakerInstanceWithHelperRector::class);
-};
diff --git a/tests/Rector/StaticCall/EloquentMagicMethodToQueryBuilderRector/EloquentMagicMethodToQueryBuilderRectorTest.php b/tests/Rector/StaticCall/EloquentMagicMethodToQueryBuilderRector/EloquentMagicMethodToQueryBuilderRectorTest.php
deleted file mode 100644
index c86bd56e..00000000
--- a/tests/Rector/StaticCall/EloquentMagicMethodToQueryBuilderRector/EloquentMagicMethodToQueryBuilderRectorTest.php
+++ /dev/null
@@ -1,33 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/StaticCall/EloquentMagicMethodToQueryBuilderRector/Fixture/fixture.php.inc b/tests/Rector/StaticCall/EloquentMagicMethodToQueryBuilderRector/Fixture/fixture.php.inc
deleted file mode 100644
index cd25aa79..00000000
--- a/tests/Rector/StaticCall/EloquentMagicMethodToQueryBuilderRector/Fixture/fixture.php.inc
+++ /dev/null
@@ -1,47 +0,0 @@
-where('xxx', 'xxx')->first();
- $user = User::publicMethodBelongsToQueryBuilder(1);
-
- # not eligible
- $user = User::privateMethodBelongsToQueryBuilder(1);
- $user = User::protectedMethodBelongsToQueryBuilder(1);
- $user = User::publicMethodNotBelongsToQueryBuilder(1);
- $user = User::query()->publicMethodBelongsToEloquentQueryBuilder(1);
- $user = User::query()->publicMethodBelongsToQueryBuilder(1);
- $user = User::staticMethodBelongsToModel(1);
- }
-}
------
-publicMethodBelongsToEloquentQueryBuilder(1)->where('xxx', 'xxx')->first();
- $user = User::query()->publicMethodBelongsToQueryBuilder(1);
-
- # not eligible
- $user = User::privateMethodBelongsToQueryBuilder(1);
- $user = User::protectedMethodBelongsToQueryBuilder(1);
- $user = User::publicMethodNotBelongsToQueryBuilder(1);
- $user = User::query()->publicMethodBelongsToEloquentQueryBuilder(1);
- $user = User::query()->publicMethodBelongsToQueryBuilder(1);
- $user = User::staticMethodBelongsToModel(1);
- }
-}
diff --git a/tests/Rector/StaticCall/EloquentMagicMethodToQueryBuilderRector/config/configured_rule.php b/tests/Rector/StaticCall/EloquentMagicMethodToQueryBuilderRector/config/configured_rule.php
deleted file mode 100644
index 6841bc57..00000000
--- a/tests/Rector/StaticCall/EloquentMagicMethodToQueryBuilderRector/config/configured_rule.php
+++ /dev/null
@@ -1,14 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
- $rectorConfig->importNames(importDocBlockNames: false);
- $rectorConfig->importShortClasses(false);
- $rectorConfig->rule(EloquentMagicMethodToQueryBuilderRector::class);
-};
diff --git a/tests/Rector/StaticCall/MinutesToSecondsInCacheRector/Fixture/cache_static_call.php.inc b/tests/Rector/StaticCall/MinutesToSecondsInCacheRector/Fixture/cache_static_call.php.inc
deleted file mode 100644
index 37dd1884..00000000
--- a/tests/Rector/StaticCall/MinutesToSecondsInCacheRector/Fixture/cache_static_call.php.inc
+++ /dev/null
@@ -1,27 +0,0 @@
-
------
-
diff --git a/tests/Rector/StaticCall/MinutesToSecondsInCacheRector/Fixture/fixture.php.inc b/tests/Rector/StaticCall/MinutesToSecondsInCacheRector/Fixture/fixture.php.inc
deleted file mode 100644
index cdbe08fe..00000000
--- a/tests/Rector/StaticCall/MinutesToSecondsInCacheRector/Fixture/fixture.php.inc
+++ /dev/null
@@ -1,61 +0,0 @@
-arrayStore = $arrayStore;
- }
-
- public function run()
- {
- \Illuminate\Support\Facades\Cache::put('key', 'value', 60);
-
- $this->arrayStore->put('key', 'value', 60);
-
- $seconds = 60;
- $this->arrayStore->putMany(['key' => 'value'], $seconds);
- }
-}
-
-?>
------
-arrayStore = $arrayStore;
- }
-
- public function run()
- {
- \Illuminate\Support\Facades\Cache::put('key', 'value', 60 * 60);
-
- $this->arrayStore->put('key', 'value', 60 * 60);
-
- $seconds = 60;
- $this->arrayStore->putMany(['key' => 'value'], $seconds * 60);
- }
-}
-
-?>
diff --git a/tests/Rector/StaticCall/MinutesToSecondsInCacheRector/Fixture/only_one.php.inc b/tests/Rector/StaticCall/MinutesToSecondsInCacheRector/Fixture/only_one.php.inc
deleted file mode 100644
index 9e82b3a8..00000000
--- a/tests/Rector/StaticCall/MinutesToSecondsInCacheRector/Fixture/only_one.php.inc
+++ /dev/null
@@ -1,27 +0,0 @@
-
------
-
diff --git a/tests/Rector/StaticCall/MinutesToSecondsInCacheRector/Fixture/remember_cache.php.inc b/tests/Rector/StaticCall/MinutesToSecondsInCacheRector/Fixture/remember_cache.php.inc
deleted file mode 100644
index cf9686b0..00000000
--- a/tests/Rector/StaticCall/MinutesToSecondsInCacheRector/Fixture/remember_cache.php.inc
+++ /dev/null
@@ -1,31 +0,0 @@
-remember('key', 'value', 60);
- }
-}
-
-?>
------
-remember('key', 'value', 60 * 60);
- }
-}
-
-?>
diff --git a/tests/Rector/StaticCall/MinutesToSecondsInCacheRector/Fixture/skip_call.php.inc b/tests/Rector/StaticCall/MinutesToSecondsInCacheRector/Fixture/skip_call.php.inc
deleted file mode 100644
index fd63f735..00000000
--- a/tests/Rector/StaticCall/MinutesToSecondsInCacheRector/Fixture/skip_call.php.inc
+++ /dev/null
@@ -1,13 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/StaticCall/MinutesToSecondsInCacheRector/config/configured_rule.php b/tests/Rector/StaticCall/MinutesToSecondsInCacheRector/config/configured_rule.php
deleted file mode 100644
index eebd204f..00000000
--- a/tests/Rector/StaticCall/MinutesToSecondsInCacheRector/config/configured_rule.php
+++ /dev/null
@@ -1,13 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
-
- $rectorConfig->rule(MinutesToSecondsInCacheRector::class);
-};
diff --git a/tests/Rector/StaticCall/Redirect301ToPermanentRedirectRector/Fixture/fixture.php.inc b/tests/Rector/StaticCall/Redirect301ToPermanentRedirectRector/Fixture/fixture.php.inc
deleted file mode 100644
index 5c880be9..00000000
--- a/tests/Rector/StaticCall/Redirect301ToPermanentRedirectRector/Fixture/fixture.php.inc
+++ /dev/null
@@ -1,27 +0,0 @@
-
------
-
diff --git a/tests/Rector/StaticCall/Redirect301ToPermanentRedirectRector/Redirect301ToPermanentRedirectRectorTest.php b/tests/Rector/StaticCall/Redirect301ToPermanentRedirectRector/Redirect301ToPermanentRedirectRectorTest.php
deleted file mode 100644
index 32749158..00000000
--- a/tests/Rector/StaticCall/Redirect301ToPermanentRedirectRector/Redirect301ToPermanentRedirectRectorTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/StaticCall/Redirect301ToPermanentRedirectRector/config/configured_rule.php b/tests/Rector/StaticCall/Redirect301ToPermanentRedirectRector/config/configured_rule.php
deleted file mode 100644
index f5e23de7..00000000
--- a/tests/Rector/StaticCall/Redirect301ToPermanentRedirectRector/config/configured_rule.php
+++ /dev/null
@@ -1,13 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
-
- $rectorConfig->rule(Redirect301ToPermanentRedirectRector::class);
-};
diff --git a/tests/Rector/StaticCall/RequestStaticValidateToInjectRector/Fixture/fixture.php.inc b/tests/Rector/StaticCall/RequestStaticValidateToInjectRector/Fixture/fixture.php.inc
deleted file mode 100644
index e2ef8848..00000000
--- a/tests/Rector/StaticCall/RequestStaticValidateToInjectRector/Fixture/fixture.php.inc
+++ /dev/null
@@ -1,31 +0,0 @@
- 'required']);
- }
-}
-
-?>
------
-validate(['some_attribute' => 'required']);
- }
-}
-
-?>
diff --git a/tests/Rector/StaticCall/RequestStaticValidateToInjectRector/Fixture/fixture_alias.php.inc b/tests/Rector/StaticCall/RequestStaticValidateToInjectRector/Fixture/fixture_alias.php.inc
deleted file mode 100644
index a91e26cd..00000000
--- a/tests/Rector/StaticCall/RequestStaticValidateToInjectRector/Fixture/fixture_alias.php.inc
+++ /dev/null
@@ -1,31 +0,0 @@
- 'required']);
- }
-}
-
-?>
------
-validate(['some_attribute' => 'required']);
- }
-}
-
-?>
diff --git a/tests/Rector/StaticCall/RequestStaticValidateToInjectRector/Fixture/fixture_without_assignment.php.inc b/tests/Rector/StaticCall/RequestStaticValidateToInjectRector/Fixture/fixture_without_assignment.php.inc
deleted file mode 100644
index 8976dd2f..00000000
--- a/tests/Rector/StaticCall/RequestStaticValidateToInjectRector/Fixture/fixture_without_assignment.php.inc
+++ /dev/null
@@ -1,35 +0,0 @@
- 'required']);
- request()->validate(['some_attribute' => 'required']);
- request()->get('foo');
- }
-}
-
-?>
------
-validate(['some_attribute' => 'required']);
- $request->validate(['some_attribute' => 'required']);
- $request->get('foo');
- }
-}
-
-?>
diff --git a/tests/Rector/StaticCall/RequestStaticValidateToInjectRector/Fixture/function.php.inc b/tests/Rector/StaticCall/RequestStaticValidateToInjectRector/Fixture/function.php.inc
deleted file mode 100644
index b8a8e14e..00000000
--- a/tests/Rector/StaticCall/RequestStaticValidateToInjectRector/Fixture/function.php.inc
+++ /dev/null
@@ -1,27 +0,0 @@
-get('foo');
- }
-}
-
-?>
------
-get('foo');
- }
-}
-
-?>
diff --git a/tests/Rector/StaticCall/RequestStaticValidateToInjectRector/Fixture/function2.php.inc b/tests/Rector/StaticCall/RequestStaticValidateToInjectRector/Fixture/function2.php.inc
deleted file mode 100644
index 1504c4ed..00000000
--- a/tests/Rector/StaticCall/RequestStaticValidateToInjectRector/Fixture/function2.php.inc
+++ /dev/null
@@ -1,27 +0,0 @@
-
------
-input('foo');
- }
-}
-
-?>
diff --git a/tests/Rector/StaticCall/RequestStaticValidateToInjectRector/Fixture/skip_function_extends.php.inc b/tests/Rector/StaticCall/RequestStaticValidateToInjectRector/Fixture/skip_function_extends.php.inc
deleted file mode 100644
index 5a943c8d..00000000
--- a/tests/Rector/StaticCall/RequestStaticValidateToInjectRector/Fixture/skip_function_extends.php.inc
+++ /dev/null
@@ -1,20 +0,0 @@
-
diff --git a/tests/Rector/StaticCall/RequestStaticValidateToInjectRector/Fixture/skip_function_trait.php.inc b/tests/Rector/StaticCall/RequestStaticValidateToInjectRector/Fixture/skip_function_trait.php.inc
deleted file mode 100644
index 004251d5..00000000
--- a/tests/Rector/StaticCall/RequestStaticValidateToInjectRector/Fixture/skip_function_trait.php.inc
+++ /dev/null
@@ -1,22 +0,0 @@
-
diff --git a/tests/Rector/StaticCall/RequestStaticValidateToInjectRector/RequestStaticValidateToInjectRectorTest.php b/tests/Rector/StaticCall/RequestStaticValidateToInjectRector/RequestStaticValidateToInjectRectorTest.php
deleted file mode 100644
index e92cd834..00000000
--- a/tests/Rector/StaticCall/RequestStaticValidateToInjectRector/RequestStaticValidateToInjectRectorTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/StaticCall/RequestStaticValidateToInjectRector/config/configured_rule.php b/tests/Rector/StaticCall/RequestStaticValidateToInjectRector/config/configured_rule.php
deleted file mode 100644
index a34e62d7..00000000
--- a/tests/Rector/StaticCall/RequestStaticValidateToInjectRector/config/configured_rule.php
+++ /dev/null
@@ -1,13 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
-
- $rectorConfig->rule(RequestStaticValidateToInjectRector::class);
-};
diff --git a/tests/Rector/StaticCall/RouteActionCallableRector/Fixture/fixture.php.inc b/tests/Rector/StaticCall/RouteActionCallableRector/Fixture/fixture.php.inc
deleted file mode 100644
index ebb8f606..00000000
--- a/tests/Rector/StaticCall/RouteActionCallableRector/Fixture/fixture.php.inc
+++ /dev/null
@@ -1,39 +0,0 @@
-options('/users', 'SomeController@index');
-
-?>
------
-options('/users', [\RectorLaravel\Tests\Rector\StaticCall\RouteActionCallableRector\Source\SomeController::class, 'index']);
-
-?>
diff --git a/tests/Rector/StaticCall/RouteActionCallableRector/Fixture/named_route.php.inc b/tests/Rector/StaticCall/RouteActionCallableRector/Fixture/named_route.php.inc
deleted file mode 100644
index fe295bcf..00000000
--- a/tests/Rector/StaticCall/RouteActionCallableRector/Fixture/named_route.php.inc
+++ /dev/null
@@ -1,21 +0,0 @@
- 'users.index', 'uses' => 'SomeController@index']);
-Route::get('/users', ['uses' => 'SomeController@index', 'as' => 'users.index']);
-
-?>
------
-name('users.index');
-Route::get('/users', [\RectorLaravel\Tests\Rector\StaticCall\RouteActionCallableRector\Source\SomeController::class, 'index'])->name('users.index');
-
-?>
diff --git a/tests/Rector/StaticCall/RouteActionCallableRector/Fixture/named_route_with_middleware.php.inc b/tests/Rector/StaticCall/RouteActionCallableRector/Fixture/named_route_with_middleware.php.inc
deleted file mode 100644
index 9e30053e..00000000
--- a/tests/Rector/StaticCall/RouteActionCallableRector/Fixture/named_route_with_middleware.php.inc
+++ /dev/null
@@ -1,41 +0,0 @@
- 'users.index', 'middleware' => 'auth', 'uses' => 'SomeController@index']);
-Route::get('/users', ['as' => 'users.index', 'uses' => 'SomeController@index', 'middleware' => 'auth']);
-Route::get('/users', ['uses' => 'SomeController@index', 'middleware' => 'auth', 'as' => 'users.index']);
-Route::get('/users', ['uses' => 'SomeController@index', 'as' => 'users.index', 'middleware' => 'auth']);
-Route::get('/users', ['middleware' => 'auth', 'as' => 'users.index', 'uses' => 'SomeController@index']);
-Route::get('/users', ['middleware' => 'auth', 'uses' => 'SomeController@index', 'as' => 'users.index']);
-Route::get('/users', ['as' => 'users.index', 'middleware' => ['auth', 'throttle:20,1'], 'uses' => 'SomeController@index']);
-Route::get('/users', ['as' => 'users.index', 'uses' => 'SomeController@index', 'middleware' => ['auth', 'throttle:20,1']]);
-Route::get('/users', ['uses' => 'SomeController@index', 'as' => 'users.index', 'middleware' => ['auth', 'throttle:20,1']]);
-Route::get('/users', ['uses' => 'SomeController@index', 'middleware' => ['auth', 'throttle:20,1'], 'as' => 'users.index']);
-Route::get('/users', ['middleware' => ['auth', 'throttle:20,1'], 'uses' => 'SomeController@index', 'as' => 'users.index']);
-Route::get('/users', ['middleware' => ['auth', 'throttle:20,1'], 'as' => 'users.index', 'uses' => 'SomeController@index']);
-
-?>
------
-name('users.index')->middleware('auth');
-Route::get('/users', [\RectorLaravel\Tests\Rector\StaticCall\RouteActionCallableRector\Source\SomeController::class, 'index'])->name('users.index')->middleware('auth');
-Route::get('/users', [\RectorLaravel\Tests\Rector\StaticCall\RouteActionCallableRector\Source\SomeController::class, 'index'])->name('users.index')->middleware('auth');
-Route::get('/users', [\RectorLaravel\Tests\Rector\StaticCall\RouteActionCallableRector\Source\SomeController::class, 'index'])->name('users.index')->middleware('auth');
-Route::get('/users', [\RectorLaravel\Tests\Rector\StaticCall\RouteActionCallableRector\Source\SomeController::class, 'index'])->name('users.index')->middleware('auth');
-Route::get('/users', [\RectorLaravel\Tests\Rector\StaticCall\RouteActionCallableRector\Source\SomeController::class, 'index'])->name('users.index')->middleware('auth');
-Route::get('/users', [\RectorLaravel\Tests\Rector\StaticCall\RouteActionCallableRector\Source\SomeController::class, 'index'])->name('users.index')->middleware(['auth', 'throttle:20,1']);
-Route::get('/users', [\RectorLaravel\Tests\Rector\StaticCall\RouteActionCallableRector\Source\SomeController::class, 'index'])->name('users.index')->middleware(['auth', 'throttle:20,1']);
-Route::get('/users', [\RectorLaravel\Tests\Rector\StaticCall\RouteActionCallableRector\Source\SomeController::class, 'index'])->name('users.index')->middleware(['auth', 'throttle:20,1']);
-Route::get('/users', [\RectorLaravel\Tests\Rector\StaticCall\RouteActionCallableRector\Source\SomeController::class, 'index'])->name('users.index')->middleware(['auth', 'throttle:20,1']);
-Route::get('/users', [\RectorLaravel\Tests\Rector\StaticCall\RouteActionCallableRector\Source\SomeController::class, 'index'])->name('users.index')->middleware(['auth', 'throttle:20,1']);
-Route::get('/users', [\RectorLaravel\Tests\Rector\StaticCall\RouteActionCallableRector\Source\SomeController::class, 'index'])->name('users.index')->middleware(['auth', 'throttle:20,1']);
-
-?>
diff --git a/tests/Rector/StaticCall/RouteActionCallableRector/Fixture/only_array_route.php.inc b/tests/Rector/StaticCall/RouteActionCallableRector/Fixture/only_array_route.php.inc
deleted file mode 100644
index 6c0a80ae..00000000
--- a/tests/Rector/StaticCall/RouteActionCallableRector/Fixture/only_array_route.php.inc
+++ /dev/null
@@ -1,21 +0,0 @@
- 'SomeController@index']);
-Route::get('/users', ['uses' => 'SomeController@index']);
-
-?>
------
-
diff --git a/tests/Rector/StaticCall/RouteActionCallableRector/Fixture/route_with_middleware.php.inc b/tests/Rector/StaticCall/RouteActionCallableRector/Fixture/route_with_middleware.php.inc
deleted file mode 100644
index ce0d3b98..00000000
--- a/tests/Rector/StaticCall/RouteActionCallableRector/Fixture/route_with_middleware.php.inc
+++ /dev/null
@@ -1,25 +0,0 @@
- 'auth', 'uses' => 'SomeController@index']);
-Route::get('/users', ['uses' => 'SomeController@index', 'middleware' => 'auth']);
-Route::get('/users', ['middleware' => ['auth', 'throttle:20,1'], 'uses' => 'SomeController@index']);
-Route::get('/users', ['uses' => 'SomeController@index', 'middleware' => ['auth', 'throttle:20,1']]);
-
-?>
------
-middleware('auth');
-Route::get('/users', [\RectorLaravel\Tests\Rector\StaticCall\RouteActionCallableRector\Source\SomeController::class, 'index'])->middleware('auth');
-Route::get('/users', [\RectorLaravel\Tests\Rector\StaticCall\RouteActionCallableRector\Source\SomeController::class, 'index'])->middleware(['auth', 'throttle:20,1']);
-Route::get('/users', [\RectorLaravel\Tests\Rector\StaticCall\RouteActionCallableRector\Source\SomeController::class, 'index'])->middleware(['auth', 'throttle:20,1']);
-
-?>
diff --git a/tests/Rector/StaticCall/RouteActionCallableRector/Fixture/skip_method_not_exists.php.inc b/tests/Rector/StaticCall/RouteActionCallableRector/Fixture/skip_method_not_exists.php.inc
deleted file mode 100644
index 27e24cdf..00000000
--- a/tests/Rector/StaticCall/RouteActionCallableRector/Fixture/skip_method_not_exists.php.inc
+++ /dev/null
@@ -1,21 +0,0 @@
-
------
-
diff --git a/tests/Rector/StaticCall/RouteActionCallableRector/Fixture/skip_multiple_at.php.inc b/tests/Rector/StaticCall/RouteActionCallableRector/Fixture/skip_multiple_at.php.inc
deleted file mode 100644
index 2125fba1..00000000
--- a/tests/Rector/StaticCall/RouteActionCallableRector/Fixture/skip_multiple_at.php.inc
+++ /dev/null
@@ -1,19 +0,0 @@
-
------
-
diff --git a/tests/Rector/StaticCall/RouteActionCallableRector/RouteActionCallableRectorTest.php b/tests/Rector/StaticCall/RouteActionCallableRector/RouteActionCallableRectorTest.php
deleted file mode 100644
index e40245e1..00000000
--- a/tests/Rector/StaticCall/RouteActionCallableRector/RouteActionCallableRectorTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-doTestFile($filePath);
- }
-
- public static function provideData(): Iterator
- {
- return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
- }
-
- public function provideConfigFilePath(): string
- {
- return __DIR__ . '/config/configured_rule.php';
- }
-}
diff --git a/tests/Rector/StaticCall/RouteActionCallableRector/Source/SomeController.php b/tests/Rector/StaticCall/RouteActionCallableRector/Source/SomeController.php
deleted file mode 100644
index 406774e0..00000000
--- a/tests/Rector/StaticCall/RouteActionCallableRector/Source/SomeController.php
+++ /dev/null
@@ -1,11 +0,0 @@
-import(__DIR__ . '/../../../../../config/config.php');
- $rectorConfig->ruleWithConfiguration(RouteActionCallableRector::class, [
- RouteActionCallableRector::NAMESPACE => 'RectorLaravel\Tests\Rector\StaticCall\RouteActionCallableRector\Source',
- ]);
-};