diff --git a/composer.json b/composer.json index 77117b30..fa9eb0ee 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,7 @@ }, "require-dev": { "phpstan/extension-installer": "^1.3", - "phpstan/phpstan": "^2.0", + "phpstan/phpstan": "^2.1.8", "phpstan/phpstan-webmozart-assert": "^2.0", "phpunit/phpunit": "^11.4", "rector/rector-src": "dev-main", diff --git a/rules/DowngradePhp72/Rector/ClassMethod/DowngradeParameterTypeWideningRector.php b/rules/DowngradePhp72/Rector/ClassMethod/DowngradeParameterTypeWideningRector.php index 1ba3e040..6aa01b34 100644 --- a/rules/DowngradePhp72/Rector/ClassMethod/DowngradeParameterTypeWideningRector.php +++ b/rules/DowngradePhp72/Rector/ClassMethod/DowngradeParameterTypeWideningRector.php @@ -231,7 +231,7 @@ private function isSafeType(ClassReflection $classReflection, ClassMethod $class continue; } - if ($classReflection->isSubclassOf($unsafeType)) { + if ($classReflection->is($unsafeType)) { return false; } diff --git a/src/PhpDocDecorator/PhpDocFromTypeDeclarationDecorator.php b/src/PhpDocDecorator/PhpDocFromTypeDeclarationDecorator.php index a2cba62e..c3918105 100644 --- a/src/PhpDocDecorator/PhpDocFromTypeDeclarationDecorator.php +++ b/src/PhpDocDecorator/PhpDocFromTypeDeclarationDecorator.php @@ -186,7 +186,7 @@ private function isRequireReturnTypeWillChange(ClassReflection $classReflection, continue; } - if (! $classReflection->isSubclassOf($classMethodWillChangeReturnType->getClassName())) { + if (! $classReflection->is($classMethodWillChangeReturnType->getClassName())) { continue; }