diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index ab1c0a0dfd6..a8a3c7e4d1b 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 = 'eb525ca9fe04a8bc074cf49b5cf25991014fff5f'; + public const PACKAGE_VERSION = '3122ef482389945d97c26bb3ff5c2b0b3faf867b'; /** * @api * @var string */ - public const RELEASE_DATE = '2024-03-28 15:12:20'; + public const RELEASE_DATE = '2024-03-28 09:09:29'; /** * @var int */ diff --git a/src/NodeCollector/NodeAnalyzer/ArrayCallableMethodMatcher.php b/src/NodeCollector/NodeAnalyzer/ArrayCallableMethodMatcher.php index 3dc8f8566d4..96e0af13b4b 100644 --- a/src/NodeCollector/NodeAnalyzer/ArrayCallableMethodMatcher.php +++ b/src/NodeCollector/NodeAnalyzer/ArrayCallableMethodMatcher.php @@ -142,6 +142,10 @@ final class ArrayCallableMethodMatcher private function resolveClassContextType($classContext, Scope $scope, ?string $classMethodName) { $classConstantReference = $this->valueResolver->getValue($classContext); + // non-class value + if (!\is_string($classConstantReference)) { + return new MixedType(); + } if ($this->isRequiredClassReflectionResolution($classConstantReference)) { $classReflection = $this->reflectionResolver->resolveClassReflection($classContext); if (!$classReflection instanceof ClassReflection || !$classReflection->isClass()) { @@ -149,10 +153,6 @@ final class ArrayCallableMethodMatcher } $classConstantReference = $classReflection->getName(); } - // non-class value - if (!\is_string($classConstantReference)) { - return new MixedType(); - } if (!$this->reflectionProvider->hasClass($classConstantReference)) { return new MixedType(); } @@ -191,9 +191,6 @@ final class ArrayCallableMethodMatcher if ($classConstantReference === ObjectReference::STATIC) { return \true; } - if ($classConstantReference === '__CLASS__') { - return \true; - } - return \false; + return $classConstantReference === '__CLASS__'; } }