diff --git a/composer.json b/composer.json index 9629e429..c0a93c44 100644 --- a/composer.json +++ b/composer.json @@ -8,11 +8,11 @@ }, "require-dev": { "phpstan/extension-installer": "^1.4", - "phpstan/phpstan": "^2.1.33", + "phpstan/phpstan": "2.1.x-dev", "phpstan/phpstan-webmozart-assert": "^2.0", "phpunit/phpunit": "^11.5", "rector/jack": "^0.5.1", - "rector/rector-src": "dev-main", + "rector/rector-src": "dev-test-21xdev", "rector/swiss-knife": "^2.3", "rector/type-perfect": "^2.1", "symplify/easy-coding-standard": "^13.0", diff --git a/rules/DowngradePhp72/NodeManipulator/BitwiseFlagCleaner.php b/rules/DowngradePhp72/NodeManipulator/BitwiseFlagCleaner.php index 3e0e77d4..f10eb109 100644 --- a/rules/DowngradePhp72/NodeManipulator/BitwiseFlagCleaner.php +++ b/rules/DowngradePhp72/NodeManipulator/BitwiseFlagCleaner.php @@ -21,7 +21,6 @@ public function __construct( public function cleanFuncCall(FuncCall $funcCall, BitwiseOr $bitwiseOr, string $flag, ?Expr $expr = null): void { if ($bitwiseOr->left instanceof BitwiseOr) { - /** @var BitwiseOr $leftLeft */ $leftLeft = $bitwiseOr->left; if ($leftLeft->left instanceof ConstFetch && $this->nodeNameResolver ->isName($leftLeft->left, $flag)) { diff --git a/rules/DowngradePhp73/Rector/List_/DowngradeListReferenceAssignmentRector.php b/rules/DowngradePhp73/Rector/List_/DowngradeListReferenceAssignmentRector.php index 606c88ee..866c97dd 100644 --- a/rules/DowngradePhp73/Rector/List_/DowngradeListReferenceAssignmentRector.php +++ b/rules/DowngradePhp73/Rector/List_/DowngradeListReferenceAssignmentRector.php @@ -107,7 +107,6 @@ public function refactor(Node $node): ?array return null; } - /** @var Variable $exprVariable */ $exprVariable = $assign->expr; // Count number of params by ref on the right side, to remove them later on @@ -210,7 +209,6 @@ private function createAssignRefArrayFromListReferences( $key = $this->getArrayItemKey($listItem, $position); // Either the item is a variable, or a nested list if ($listItem->value instanceof Variable) { - /** @var Variable $itemVariable */ $itemVariable = $listItem->value; // Remove the reference in the present arrayOrList $listItem->byRef = false; diff --git a/rules/DowngradePhp74/Rector/ClassMethod/DowngradeCovariantReturnTypeRector.php b/rules/DowngradePhp74/Rector/ClassMethod/DowngradeCovariantReturnTypeRector.php index 98657cdf..c1184515 100644 --- a/rules/DowngradePhp74/Rector/ClassMethod/DowngradeCovariantReturnTypeRector.php +++ b/rules/DowngradePhp74/Rector/ClassMethod/DowngradeCovariantReturnTypeRector.php @@ -236,7 +236,7 @@ private function resolveMatchingReturnType( continue; } - if ($parentReturnType->equals($returnType)) { + if ($returnType->equals($parentReturnType)) { continue; }