diff --git a/rules/Php81/Rector/FuncCall/NullToStrictStringFuncCallArgRector.php b/rules/Php81/Rector/FuncCall/NullToStrictStringFuncCallArgRector.php index 3e89325a02d..6c904fa5e8e 100644 --- a/rules/Php81/Rector/FuncCall/NullToStrictStringFuncCallArgRector.php +++ b/rules/Php81/Rector/FuncCall/NullToStrictStringFuncCallArgRector.php @@ -179,7 +179,7 @@ CODE_SAMPLE if ($argValue instanceof Encapsed) { return null; } - if ($this->isAnErrorTypeFromParentScope($argValue, $scope)) { + if ($this->isAnErrorType($argValue, $nativeType, $scope)) { return null; } if ($this->shouldSkipTrait($argValue, $type, $isTrait)) { @@ -217,9 +217,6 @@ CODE_SAMPLE if (!$isTrait) { return \false; } - if ($type instanceof ErrorType) { - return \true; - } if ($type->isExplicitMixed()) { return \false; } @@ -228,8 +225,11 @@ CODE_SAMPLE } return \true; } - private function isAnErrorTypeFromParentScope(Expr $expr, Scope $scope) : bool + private function isAnErrorType(Expr $expr, Type $type, Scope $scope) : bool { + if ($type instanceof ErrorType) { + return \true; + } $parentScope = $scope->getParentScope(); if ($parentScope instanceof Scope) { return $parentScope->getType($expr) instanceof ErrorType; diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 92c7a18788c..3ce064d18d0 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -19,12 +19,12 @@ final class VersionResolver * @api * @var string */ - public const PACKAGE_VERSION = '86eb512e4f78f909856b90bc18e41704b48ee57a'; + public const PACKAGE_VERSION = '2b811afb584aa7a3c569a2ce23d78edbf126d556'; /** * @api * @var string */ - public const RELEASE_DATE = '2024-04-14 00:29:04'; + public const RELEASE_DATE = '2024-04-15 19:25:17'; /** * @var int */