mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-17 21:38:22 +01:00
Updated Rector to commit 3122ef482389945d97c26bb3ff5c2b0b3faf867b
3122ef4823
[NodeCollector] Fix non-string value on ArrayCallableMethodMatcher::resolveClassContextType() (#5780)
This commit is contained in:
parent
30adaf3fc0
commit
7af3ed15e0
@ -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
|
||||
*/
|
||||
|
@ -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__';
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user