mirror of https://github.com/rectorphp/rector.git
Updated Rector to commit 5a1512b4c0939c1b8f9ab7a1c0eb40029acb1537
5a1512b4c0
[TypeDeclaration] Allow return static from under function on ReturnTypeFromStrictTypedCallRector (#5358)
This commit is contained in:
parent
b571b1cd51
commit
7c223ab41f
|
@ -117,10 +117,7 @@ final class ReturnStrictTypeAnalyzer
|
|||
private function normalizeStaticType($call, Type $type) : Type
|
||||
{
|
||||
$reflectionClass = $this->reflectionResolver->resolveClassReflection($call);
|
||||
if (!$reflectionClass instanceof ClassReflection) {
|
||||
return $type;
|
||||
}
|
||||
$currentClassName = $reflectionClass->getName();
|
||||
$currentClassName = $reflectionClass instanceof ClassReflection ? $reflectionClass->getName() : null;
|
||||
return TypeTraverser::map($type, static function (Type $currentType, callable $traverseCallback) use($currentClassName) : Type {
|
||||
if ($currentType instanceof StaticType && $currentClassName !== $currentType->getClassName()) {
|
||||
return new FullyQualifiedObjectType($currentType->getClassName());
|
||||
|
|
|
@ -19,12 +19,12 @@ final class VersionResolver
|
|||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '0817980433aaf92d2b71e4d9804ec1988afbf908';
|
||||
public const PACKAGE_VERSION = '5a1512b4c0939c1b8f9ab7a1c0eb40029acb1537';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2023-12-13 19:58:49';
|
||||
public const RELEASE_DATE = '2023-12-13 14:08:34';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue