mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-27 13:13:31 +00:00
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
|
private function normalizeStaticType($call, Type $type) : Type
|
||||||
{
|
{
|
||||||
$reflectionClass = $this->reflectionResolver->resolveClassReflection($call);
|
$reflectionClass = $this->reflectionResolver->resolveClassReflection($call);
|
||||||
if (!$reflectionClass instanceof ClassReflection) {
|
$currentClassName = $reflectionClass instanceof ClassReflection ? $reflectionClass->getName() : null;
|
||||||
return $type;
|
|
||||||
}
|
|
||||||
$currentClassName = $reflectionClass->getName();
|
|
||||||
return TypeTraverser::map($type, static function (Type $currentType, callable $traverseCallback) use($currentClassName) : Type {
|
return TypeTraverser::map($type, static function (Type $currentType, callable $traverseCallback) use($currentClassName) : Type {
|
||||||
if ($currentType instanceof StaticType && $currentClassName !== $currentType->getClassName()) {
|
if ($currentType instanceof StaticType && $currentClassName !== $currentType->getClassName()) {
|
||||||
return new FullyQualifiedObjectType($currentType->getClassName());
|
return new FullyQualifiedObjectType($currentType->getClassName());
|
||||||
|
|
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||||
* @api
|
* @api
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public const PACKAGE_VERSION = '0817980433aaf92d2b71e4d9804ec1988afbf908';
|
public const PACKAGE_VERSION = '5a1512b4c0939c1b8f9ab7a1c0eb40029acb1537';
|
||||||
/**
|
/**
|
||||||
* @api
|
* @api
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public const RELEASE_DATE = '2023-12-13 19:58:49';
|
public const RELEASE_DATE = '2023-12-13 14:08:34';
|
||||||
/**
|
/**
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue
Block a user