diff --git a/composer.json b/composer.json index a473404f..d8642057 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,7 @@ }, "require-dev": { "rector/rector-src": "dev-main", - "phpunit/phpunit": "^10.5", + "phpunit/phpunit": "^11.4", "phpstan/phpstan": "^2.0", "symplify/easy-coding-standard": "^12.3", "phpstan/extension-installer": "^1.4", diff --git a/rules/CodeQuality/Rector/ClassMethod/CreateMockToAnonymousClassRector.php b/rules/CodeQuality/Rector/ClassMethod/CreateMockToAnonymousClassRector.php index e427593b..8fec01db 100644 --- a/rules/CodeQuality/Rector/ClassMethod/CreateMockToAnonymousClassRector.php +++ b/rules/CodeQuality/Rector/ClassMethod/CreateMockToAnonymousClassRector.php @@ -133,7 +133,7 @@ public function refactor(Node $node): ?Node // has dynamic return? if ($hasDynamicReturnExprs === false) { $returnedExpr = $methodCall->getArgs()[0] -->value; + ->value; $hasDynamicReturnExprs = ! $returnedExpr instanceof Scalar && ! $returnedExpr instanceof Array_; } diff --git a/rules/CodeQuality/Rector/MethodCall/AssertComparisonToSpecificMethodRector.php b/rules/CodeQuality/Rector/MethodCall/AssertComparisonToSpecificMethodRector.php index 5703ff28..16e9b5df 100644 --- a/rules/CodeQuality/Rector/MethodCall/AssertComparisonToSpecificMethodRector.php +++ b/rules/CodeQuality/Rector/MethodCall/AssertComparisonToSpecificMethodRector.php @@ -100,7 +100,7 @@ public function refactor(Node $node): ?Node } $firstArgumentValue = $node->getArgs()[0] -->value; + ->value; if (! $firstArgumentValue instanceof BinaryOp) { return null; } diff --git a/rules/CodeQuality/Rector/MethodCall/AssertFalseStrposToContainsRector.php b/rules/CodeQuality/Rector/MethodCall/AssertFalseStrposToContainsRector.php index eb169a2c..da784991 100644 --- a/rules/CodeQuality/Rector/MethodCall/AssertFalseStrposToContainsRector.php +++ b/rules/CodeQuality/Rector/MethodCall/AssertFalseStrposToContainsRector.php @@ -68,7 +68,7 @@ public function refactor(Node $node): ?Node } $firstArgumentValue = $node->getArgs()[0] -->value; + ->value; if ($firstArgumentValue instanceof StaticCall) { return null; } diff --git a/rules/CodeQuality/Rector/MethodCall/AssertInstanceOfComparisonRector.php b/rules/CodeQuality/Rector/MethodCall/AssertInstanceOfComparisonRector.php index fc4f6062..0c77759e 100644 --- a/rules/CodeQuality/Rector/MethodCall/AssertInstanceOfComparisonRector.php +++ b/rules/CodeQuality/Rector/MethodCall/AssertInstanceOfComparisonRector.php @@ -76,7 +76,7 @@ public function refactor(Node $node): ?Node } $firstArgumentValue = $node->getArgs()[0] -->value; + ->value; if (! $firstArgumentValue instanceof Instanceof_) { return null; } diff --git a/rules/CodeQuality/Rector/MethodCall/AssertNotOperatorRector.php b/rules/CodeQuality/Rector/MethodCall/AssertNotOperatorRector.php index 34471171..412c60ac 100644 --- a/rules/CodeQuality/Rector/MethodCall/AssertNotOperatorRector.php +++ b/rules/CodeQuality/Rector/MethodCall/AssertNotOperatorRector.php @@ -68,7 +68,7 @@ public function refactor(Node $node): ?Node } $firstArgumentValue = $node->getArgs()[0] -->value; + ->value; if (! $firstArgumentValue instanceof BooleanNot) { return null; } diff --git a/rules/CodeQuality/Rector/MethodCall/AssertPropertyExistsRector.php b/rules/CodeQuality/Rector/MethodCall/AssertPropertyExistsRector.php index 25b808df..bd9bf538 100644 --- a/rules/CodeQuality/Rector/MethodCall/AssertPropertyExistsRector.php +++ b/rules/CodeQuality/Rector/MethodCall/AssertPropertyExistsRector.php @@ -86,7 +86,7 @@ public function refactor(Node $node): ?Node } $firstArgumentValue = $node->getArgs()[0] -->value; + ->value; if (! $firstArgumentValue instanceof FuncCall) { return null; } @@ -96,7 +96,7 @@ public function refactor(Node $node): ?Node } $propertyExistsMethodCall = $node->getArgs()[0] -->value; + ->value; if (! $propertyExistsMethodCall instanceof FuncCall) { return null; } diff --git a/rules/CodeQuality/Rector/MethodCall/AssertRegExpRector.php b/rules/CodeQuality/Rector/MethodCall/AssertRegExpRector.php index d8e62a7a..81beee1a 100644 --- a/rules/CodeQuality/Rector/MethodCall/AssertRegExpRector.php +++ b/rules/CodeQuality/Rector/MethodCall/AssertRegExpRector.php @@ -112,7 +112,7 @@ public function refactor(Node $node): ?Node /** @var FuncCall|Node $secondArgumentValue */ $secondArgumentValue = $stmt->expr->getArgs()[1] - ->value; + ->value; if (! $secondArgumentValue instanceof FuncCall) { continue; @@ -141,7 +141,7 @@ public function refactor(Node $node): ?Node } $oldFirstArgument = $stmt->expr->getArgs()[0] - ->value; + ->value; $oldCondition = $this->resolveOldCondition($oldFirstArgument); $this->renameMethod($stmt->expr, $oldMethodName, $oldCondition); diff --git a/rules/CodeQuality/Rector/MethodCall/AssertSameBoolNullToSpecificMethodRector.php b/rules/CodeQuality/Rector/MethodCall/AssertSameBoolNullToSpecificMethodRector.php index be1a5c88..a5a682c7 100644 --- a/rules/CodeQuality/Rector/MethodCall/AssertSameBoolNullToSpecificMethodRector.php +++ b/rules/CodeQuality/Rector/MethodCall/AssertSameBoolNullToSpecificMethodRector.php @@ -71,7 +71,7 @@ public function refactor(Node $node): ?Node } $firstArgumentValue = $node->getArgs()[0] -->value; + ->value; if (! $firstArgumentValue instanceof ConstFetch) { return null; } diff --git a/rules/CodeQuality/Rector/MethodCall/AssertTrueFalseToSpecificMethodRector.php b/rules/CodeQuality/Rector/MethodCall/AssertTrueFalseToSpecificMethodRector.php index 95bc108d..824ea245 100644 --- a/rules/CodeQuality/Rector/MethodCall/AssertTrueFalseToSpecificMethodRector.php +++ b/rules/CodeQuality/Rector/MethodCall/AssertTrueFalseToSpecificMethodRector.php @@ -173,7 +173,7 @@ private function renameMethod( private function moveFunctionArgumentsUp(MethodCall|StaticCall $node): void { $funcCallOrEmptyNode = $node->getArgs()[0] -->value; + ->value; if ($funcCallOrEmptyNode instanceof FuncCall) { $funcCallOrEmptyNodeName = $this->getName($funcCallOrEmptyNode); diff --git a/rules/CodeQuality/Rector/MethodCall/RemoveExpectAnyFromMockRector.php b/rules/CodeQuality/Rector/MethodCall/RemoveExpectAnyFromMockRector.php index 42eadbfb..11fe9115 100644 --- a/rules/CodeQuality/Rector/MethodCall/RemoveExpectAnyFromMockRector.php +++ b/rules/CodeQuality/Rector/MethodCall/RemoveExpectAnyFromMockRector.php @@ -92,7 +92,7 @@ public function refactor(Node $node): ?Node } $onlyArgument = $node->getArgs()[0] -->value; + ->value; if (! $this->isMethodCallOnVariableNamed($onlyArgument, 'this', 'any')) { return null; } diff --git a/rules/CodeQuality/Rector/MethodCall/SingleWithConsecutiveToWithRector.php b/rules/CodeQuality/Rector/MethodCall/SingleWithConsecutiveToWithRector.php index dca9115c..cdec9ed4 100644 --- a/rules/CodeQuality/Rector/MethodCall/SingleWithConsecutiveToWithRector.php +++ b/rules/CodeQuality/Rector/MethodCall/SingleWithConsecutiveToWithRector.php @@ -132,7 +132,7 @@ function (Node $node): bool { } return $node->getArgs()[0] -->value; + ->value; }); if ($hasAssertInside && $firstArg->value instanceof Array_) { diff --git a/rules/PHPUnit80/Rector/MethodCall/SpecificAssertInternalTypeRector.php b/rules/PHPUnit80/Rector/MethodCall/SpecificAssertInternalTypeRector.php index f1d53f97..0d5a7f5e 100644 --- a/rules/PHPUnit80/Rector/MethodCall/SpecificAssertInternalTypeRector.php +++ b/rules/PHPUnit80/Rector/MethodCall/SpecificAssertInternalTypeRector.php @@ -106,7 +106,7 @@ public function refactor(Node $node): ?Node } $typeNode = $node->getArgs()[0] -->value; + ->value; if (! $typeNode instanceof String_) { return null; }