Updated Rector to commit 742378fb0f73a07fd8d63c9dd41ea5f6b8021ef2

742378fb0f [TypeDeclaration] Add AddReturnTypeDeclarationFromYieldsRector (#3114)
This commit is contained in:
Tomas Votruba 2022-11-28 11:47:46 +00:00
parent cc9387f91d
commit 7feb5bf3e3
9 changed files with 239 additions and 135 deletions

View File

@ -24,6 +24,7 @@ use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictNewArrayRector
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictTypedPropertyRector;
use Rector\TypeDeclaration\Rector\Closure\AddClosureReturnTypeRector;
use Rector\TypeDeclaration\Rector\FunctionLike\AddParamTypeSplFixedArrayRector;
use Rector\TypeDeclaration\Rector\FunctionLike\AddReturnTypeDeclarationFromYieldsRector;
use Rector\TypeDeclaration\Rector\FunctionLike\ReturnTypeDeclarationRector;
use Rector\TypeDeclaration\Rector\Param\ParamTypeFromStrictTypedPropertyRector;
use Rector\TypeDeclaration\Rector\Property\PropertyTypeDeclarationRector;
@ -33,5 +34,35 @@ use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromStrictGetterMethodRe
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromStrictSetUpRector;
use Rector\TypeDeclaration\Rector\Property\VarAnnotationIncorrectNullableRector;
return static function (RectorConfig $rectorConfig) : void {
$rectorConfig->rules([ReturnTypeDeclarationRector::class, PropertyTypeDeclarationRector::class, AddClosureReturnTypeRector::class, AddArrowFunctionReturnTypeRector::class, AddArrayReturnDocTypeRector::class, ParamTypeByMethodCallTypeRector::class, TypedPropertyFromAssignsRector::class, ReturnAnnotationIncorrectNullableRector::class, VarAnnotationIncorrectNullableRector::class, ParamAnnotationIncorrectNullableRector::class, AddReturnTypeDeclarationBasedOnParentClassMethodRector::class, ReturnTypeFromStrictTypedPropertyRector::class, TypedPropertyFromStrictConstructorRector::class, ParamTypeFromStrictTypedPropertyRector::class, AddVoidReturnTypeWhereNoReturnRector::class, ReturnTypeFromReturnNewRector::class, TypedPropertyFromStrictGetterMethodReturnTypeRector::class, AddMethodCallBasedStrictParamTypeRector::class, ArrayShapeFromConstantArrayReturnRector::class, ReturnTypeFromStrictBoolReturnExprRector::class, ReturnTypeFromStrictNativeCallRector::class, ReturnTypeFromStrictNewArrayRector::class, ReturnTypeFromStrictScalarReturnExprRector::class, TypedPropertyFromStrictSetUpRector::class, ParamTypeByParentCallTypeRector::class, AddParamTypeSplFixedArrayRector::class, AddParamTypeBasedOnPHPUnitDataProviderRector::class, AddParamTypeFromPropertyTypeRector::class]);
$rectorConfig->rules([
// ReturnTypeDeclarationRector::class,
PropertyTypeDeclarationRector::class,
AddClosureReturnTypeRector::class,
AddArrowFunctionReturnTypeRector::class,
AddArrayReturnDocTypeRector::class,
ParamTypeByMethodCallTypeRector::class,
TypedPropertyFromAssignsRector::class,
ReturnAnnotationIncorrectNullableRector::class,
VarAnnotationIncorrectNullableRector::class,
ParamAnnotationIncorrectNullableRector::class,
AddReturnTypeDeclarationBasedOnParentClassMethodRector::class,
ReturnTypeFromStrictTypedPropertyRector::class,
TypedPropertyFromStrictConstructorRector::class,
ParamTypeFromStrictTypedPropertyRector::class,
AddVoidReturnTypeWhereNoReturnRector::class,
ReturnTypeFromReturnNewRector::class,
TypedPropertyFromStrictGetterMethodReturnTypeRector::class,
AddMethodCallBasedStrictParamTypeRector::class,
ArrayShapeFromConstantArrayReturnRector::class,
ReturnTypeFromStrictBoolReturnExprRector::class,
ReturnTypeFromStrictNativeCallRector::class,
ReturnTypeFromStrictNewArrayRector::class,
ReturnTypeFromStrictScalarReturnExprRector::class,
TypedPropertyFromStrictSetUpRector::class,
ParamTypeByParentCallTypeRector::class,
AddParamTypeSplFixedArrayRector::class,
AddParamTypeBasedOnPHPUnitDataProviderRector::class,
AddParamTypeFromPropertyTypeRector::class,
AddReturnTypeDeclarationFromYieldsRector::class,
]);
};

View File

@ -0,0 +1,189 @@
<?php
declare (strict_types=1);
namespace Rector\TypeDeclaration\Rector\FunctionLike;
use PhpParser\Node;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\Yield_;
use PhpParser\Node\Expr\YieldFrom;
use PhpParser\Node\FunctionLike;
use PhpParser\Node\Identifier;
use PhpParser\Node\Name;
use PhpParser\Node\Stmt\Class_;
use PhpParser\Node\Stmt\ClassMethod;
use PhpParser\Node\Stmt\Function_;
use PhpParser\NodeTraverser;
use PHPStan\Type\MixedType;
use PHPStan\Type\Type;
use Rector\Core\Rector\AbstractRector;
use Rector\Core\ValueObject\PhpVersionFeature;
use Rector\NodeTypeResolver\PHPStan\Type\TypeFactory;
use Rector\PhpDocParser\NodeTraverser\SimpleCallableNodeTraverser;
use Rector\PHPStanStaticTypeMapper\Enum\TypeKind;
use Rector\StaticTypeMapper\ValueObject\Type\FullyQualifiedGenericObjectType;
use Rector\StaticTypeMapper\ValueObject\Type\FullyQualifiedObjectType;
use Rector\VersionBonding\Contract\MinPhpVersionInterface;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @see \Rector\Tests\TypeDeclaration\Rector\FunctionLike\AddReturnTypeDeclarationFromYieldsRector\AddReturnTypeDeclarationFromYieldsRectorTest
*/
final class AddReturnTypeDeclarationFromYieldsRector extends AbstractRector implements MinPhpVersionInterface
{
/**
* @readonly
* @var \Rector\NodeTypeResolver\PHPStan\Type\TypeFactory
*/
private $typeFactory;
/**
* @readonly
* @var \Rector\PhpDocParser\NodeTraverser\SimpleCallableNodeTraverser
*/
private $simpleCallableNodeTraverser;
public function __construct(TypeFactory $typeFactory, SimpleCallableNodeTraverser $simpleCallableNodeTraverser)
{
$this->typeFactory = $typeFactory;
$this->simpleCallableNodeTraverser = $simpleCallableNodeTraverser;
}
public function getRuleDefinition() : RuleDefinition
{
return new RuleDefinition('Add return type declarations from yields', [new CodeSample(<<<'CODE_SAMPLE'
class SomeClass
{
public function provide()
{
yield 1;
}
}
CODE_SAMPLE
, <<<'CODE_SAMPLE'
class SomeClass
{
/**
* @return Iterator<int>
*/
public function provide(): Iterator
{
yield 1;
}
}
CODE_SAMPLE
)]);
}
/**
* @return array<class-string<Node>>
*/
public function getNodeTypes() : array
{
return [Function_::class, ClassMethod::class];
}
/**
* @param Function_|ClassMethod $node
*/
public function refactor(Node $node) : ?Node
{
$yieldNodes = $this->findCurrentScopeYieldNodes($node);
if ($yieldNodes === []) {
return null;
}
// skip already filled type
if ($node->returnType instanceof Node && $this->isNames($node->returnType, ['Iterator', 'Generator', 'Traversable'])) {
return null;
}
$yieldType = $this->resolveYieldType($yieldNodes, $node);
$returnTypeNode = $this->staticTypeMapper->mapPHPStanTypeToPhpParserNode($yieldType, TypeKind::RETURN);
if (!$returnTypeNode instanceof Node) {
return null;
}
$node->returnType = $returnTypeNode;
return $node;
}
public function provideMinPhpVersion() : int
{
return PhpVersionFeature::SCALAR_TYPES;
}
/**
* @return Yield_[]|YieldFrom[]
*/
private function findCurrentScopeYieldNodes(FunctionLike $functionLike) : array
{
$yieldNodes = [];
$this->simpleCallableNodeTraverser->traverseNodesWithCallable((array) $functionLike->getStmts(), static function (Node $node) use(&$yieldNodes) : ?int {
// skip anonymous class and inner function
if ($node instanceof Class_) {
return NodeTraverser::DONT_TRAVERSE_CHILDREN;
}
// skip nested scope
if ($node instanceof FunctionLike) {
return NodeTraverser::DONT_TRAVERSE_CHILDREN;
}
if (!$node instanceof Yield_ && !$node instanceof YieldFrom) {
return null;
}
$yieldNodes[] = $node;
return null;
});
return $yieldNodes;
}
/**
* @param \PhpParser\Node\Expr\Yield_|\PhpParser\Node\Expr\YieldFrom $yield
*/
private function resolveYieldValue($yield) : ?Expr
{
if ($yield instanceof Yield_) {
return $yield->value;
}
return $yield->expr;
}
/**
* @param array<Yield_|YieldFrom> $yieldNodes
* @return Type[]
*/
private function resolveYieldedTypes(array $yieldNodes) : array
{
$yieldedTypes = [];
foreach ($yieldNodes as $yieldNode) {
$value = $this->resolveYieldValue($yieldNode);
if (!$value instanceof Expr) {
// one of the yields is empty
return [];
}
$resolvedType = $this->nodeTypeResolver->getType($value);
if ($resolvedType instanceof MixedType) {
continue;
}
$yieldedTypes[] = $resolvedType;
}
return $yieldedTypes;
}
/**
* @param array<Yield_|YieldFrom> $yieldNodes
* @param \PhpParser\Node\Stmt\ClassMethod|\PhpParser\Node\Stmt\Function_ $functionLike
* @return \Rector\StaticTypeMapper\ValueObject\Type\FullyQualifiedObjectType|\Rector\StaticTypeMapper\ValueObject\Type\FullyQualifiedGenericObjectType
*/
private function resolveYieldType(array $yieldNodes, $functionLike)
{
$yieldedTypes = $this->resolveYieldedTypes($yieldNodes);
$className = $this->resolveClassName($functionLike);
if ($yieldedTypes === []) {
return new FullyQualifiedObjectType($className);
}
$yieldedTypes = $this->typeFactory->createMixedPassedOrUnionType($yieldedTypes);
return new FullyQualifiedGenericObjectType($className, [$yieldedTypes]);
}
/**
* @param \PhpParser\Node\Stmt\Function_|\PhpParser\Node\Stmt\ClassMethod $functionLike
*/
private function resolveClassName($functionLike) : string
{
$returnTypeNode = $functionLike->getReturnType();
if ($returnTypeNode instanceof Identifier && $returnTypeNode->name === 'iterable') {
return 'Iterator';
}
if ($returnTypeNode instanceof Name && !$this->nodeNameResolver->isName($returnTypeNode, 'Generator')) {
return $this->nodeNameResolver->getName($returnTypeNode);
}
return 'Generator';
}
}

View File

@ -1,117 +0,0 @@
<?php
declare (strict_types=1);
namespace Rector\TypeDeclaration\TypeInferer\ReturnTypeInferer;
use PhpParser\Node;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\Yield_;
use PhpParser\Node\Expr\YieldFrom;
use PhpParser\Node\FunctionLike;
use PhpParser\Node\Identifier;
use PhpParser\Node\Name;
use PhpParser\NodeTraverser;
use PHPStan\Type\MixedType;
use PHPStan\Type\Type;
use Rector\NodeNameResolver\NodeNameResolver;
use Rector\NodeTypeResolver\NodeTypeResolver;
use Rector\NodeTypeResolver\PHPStan\Type\TypeFactory;
use Rector\PhpDocParser\NodeTraverser\SimpleCallableNodeTraverser;
use Rector\StaticTypeMapper\ValueObject\Type\FullyQualifiedGenericObjectType;
use Rector\StaticTypeMapper\ValueObject\Type\FullyQualifiedObjectType;
use Rector\TypeDeclaration\Contract\TypeInferer\ReturnTypeInfererInterface;
final class YieldNodesReturnTypeInfererTypeInferer implements ReturnTypeInfererInterface
{
/**
* @readonly
* @var \Rector\NodeTypeResolver\NodeTypeResolver
*/
private $nodeTypeResolver;
/**
* @readonly
* @var \Rector\NodeTypeResolver\PHPStan\Type\TypeFactory
*/
private $typeFactory;
/**
* @readonly
* @var \Rector\PhpDocParser\NodeTraverser\SimpleCallableNodeTraverser
*/
private $simpleCallableNodeTraverser;
/**
* @readonly
* @var \Rector\NodeNameResolver\NodeNameResolver
*/
private $nodeNameResolver;
public function __construct(NodeTypeResolver $nodeTypeResolver, TypeFactory $typeFactory, SimpleCallableNodeTraverser $simpleCallableNodeTraverser, NodeNameResolver $nodeNameResolver)
{
$this->nodeTypeResolver = $nodeTypeResolver;
$this->typeFactory = $typeFactory;
$this->simpleCallableNodeTraverser = $simpleCallableNodeTraverser;
$this->nodeNameResolver = $nodeNameResolver;
}
public function inferFunctionLike(FunctionLike $functionLike) : Type
{
$yieldNodes = $this->findCurrentScopeYieldNodes($functionLike);
if ($yieldNodes === []) {
return new MixedType();
}
$types = [];
foreach ($yieldNodes as $yieldNode) {
$value = $this->resolveYieldValue($yieldNode);
if (!$value instanceof Expr) {
continue;
}
$resolvedType = $this->nodeTypeResolver->getType($value);
if ($resolvedType instanceof MixedType) {
continue;
}
$types[] = $resolvedType;
}
$returnType = $functionLike->getReturnType();
$className = 'Generator';
if ($returnType instanceof Identifier && $returnType->name === 'iterable') {
$className = 'Iterator';
}
if ($returnType instanceof Name && !$this->nodeNameResolver->isName($returnType, 'Generator')) {
$className = $this->nodeNameResolver->getName($returnType);
}
if ($types === []) {
return new FullyQualifiedObjectType($className);
}
$types = $this->typeFactory->createMixedPassedOrUnionType($types);
return new FullyQualifiedGenericObjectType($className, [$types]);
}
public function getPriority() : int
{
return 1200;
}
/**
* @return Yield_[]|YieldFrom[]
*/
private function findCurrentScopeYieldNodes(FunctionLike $functionLike) : array
{
$yieldNodes = [];
$this->simpleCallableNodeTraverser->traverseNodesWithCallable((array) $functionLike->getStmts(), static function (Node $node) use(&$yieldNodes) : ?int {
// skip nested scope
if ($node instanceof FunctionLike) {
return NodeTraverser::DONT_TRAVERSE_CHILDREN;
}
if (!$node instanceof Yield_ && !$node instanceof YieldFrom) {
return null;
}
$yieldNodes[] = $node;
return null;
});
return $yieldNodes;
}
/**
* @param \PhpParser\Node\Expr\Yield_|\PhpParser\Node\Expr\YieldFrom $yieldExpr
*/
private function resolveYieldValue($yieldExpr) : ?Expr
{
if ($yieldExpr instanceof Yield_) {
return $yieldExpr->value;
}
return $yieldExpr->expr;
}
}

View File

@ -17,12 +17,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = 'fdb9239a9f079bef34db3e0b864ebbc996022c12';
public const PACKAGE_VERSION = '742378fb0f73a07fd8d63c9dd41ea5f6b8021ef2';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2022-11-28 11:33:55';
public const RELEASE_DATE = '2022-11-28 11:42:16';
/**
* @var int
*/

View File

@ -87,9 +87,10 @@ final class PhpVersionProvider
$this->throwInvalidTypeException($phpVersionFeatures);
}
/**
* @return never
* @param mixed $phpVersionFeatures
*/
private function throwInvalidTypeException($phpVersionFeatures) : void
private function throwInvalidTypeException($phpVersionFeatures)
{
$errorMessage = \sprintf('Parameter "%s::%s" must be int, "%s" given.%sUse constant from "%s" to provide it, e.g. "%s::%s"', Option::class, 'PHP_VERSION_FEATURES', (string) $phpVersionFeatures, \PHP_EOL, PhpVersion::class, PhpVersion::class, 'PHP_80');
throw new InvalidConfigurationException($errorMessage);

2
vendor/autoload.php vendored
View File

@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit831ceb98372a007e65852de0c9535277::getLoader();
return ComposerAutoloaderInit7d40897215713b66997208ae9db966ae::getLoader();

View File

@ -2713,6 +2713,7 @@ return array(
'Rector\\TypeDeclaration\\Rector\\ClassMethod\\ReturnTypeFromStrictTypedPropertyRector' => $baseDir . '/rules/TypeDeclaration/Rector/ClassMethod/ReturnTypeFromStrictTypedPropertyRector.php',
'Rector\\TypeDeclaration\\Rector\\Closure\\AddClosureReturnTypeRector' => $baseDir . '/rules/TypeDeclaration/Rector/Closure/AddClosureReturnTypeRector.php',
'Rector\\TypeDeclaration\\Rector\\FunctionLike\\AddParamTypeSplFixedArrayRector' => $baseDir . '/rules/TypeDeclaration/Rector/FunctionLike/AddParamTypeSplFixedArrayRector.php',
'Rector\\TypeDeclaration\\Rector\\FunctionLike\\AddReturnTypeDeclarationFromYieldsRector' => $baseDir . '/rules/TypeDeclaration/Rector/FunctionLike/AddReturnTypeDeclarationFromYieldsRector.php',
'Rector\\TypeDeclaration\\Rector\\FunctionLike\\ParamTypeDeclarationRector' => $baseDir . '/rules/TypeDeclaration/Rector/FunctionLike/ParamTypeDeclarationRector.php',
'Rector\\TypeDeclaration\\Rector\\FunctionLike\\ReturnTypeDeclarationRector' => $baseDir . '/rules/TypeDeclaration/Rector/FunctionLike/ReturnTypeDeclarationRector.php',
'Rector\\TypeDeclaration\\Rector\\Param\\ParamTypeFromStrictTypedPropertyRector' => $baseDir . '/rules/TypeDeclaration/Rector/Param/ParamTypeFromStrictTypedPropertyRector.php',
@ -2739,7 +2740,6 @@ return array(
'Rector\\TypeDeclaration\\TypeInferer\\ReturnTypeInferer' => $baseDir . '/rules/TypeDeclaration/TypeInferer/ReturnTypeInferer.php',
'Rector\\TypeDeclaration\\TypeInferer\\ReturnTypeInferer\\ReturnTypeDeclarationReturnTypeInfererTypeInferer' => $baseDir . '/rules/TypeDeclaration/TypeInferer/ReturnTypeInferer/ReturnTypeDeclarationReturnTypeInfererTypeInferer.php',
'Rector\\TypeDeclaration\\TypeInferer\\ReturnTypeInferer\\ReturnedNodesReturnTypeInfererTypeInferer' => $baseDir . '/rules/TypeDeclaration/TypeInferer/ReturnTypeInferer/ReturnedNodesReturnTypeInfererTypeInferer.php',
'Rector\\TypeDeclaration\\TypeInferer\\ReturnTypeInferer\\YieldNodesReturnTypeInfererTypeInferer' => $baseDir . '/rules/TypeDeclaration/TypeInferer/ReturnTypeInferer/YieldNodesReturnTypeInfererTypeInferer.php',
'Rector\\TypeDeclaration\\TypeInferer\\SilentVoidResolver' => $baseDir . '/rules/TypeDeclaration/TypeInferer/SilentVoidResolver.php',
'Rector\\TypeDeclaration\\TypeInferer\\SplArrayFixedTypeNarrower' => $baseDir . '/rules/TypeDeclaration/TypeInferer/SplArrayFixedTypeNarrower.php',
'Rector\\TypeDeclaration\\TypeInferer\\VarDocPropertyTypeInferer' => $baseDir . '/rules/TypeDeclaration/TypeInferer/VarDocPropertyTypeInferer.php',

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit831ceb98372a007e65852de0c9535277
class ComposerAutoloaderInit7d40897215713b66997208ae9db966ae
{
private static $loader;
@ -22,19 +22,19 @@ class ComposerAutoloaderInit831ceb98372a007e65852de0c9535277
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit831ceb98372a007e65852de0c9535277', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit7d40897215713b66997208ae9db966ae', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit831ceb98372a007e65852de0c9535277', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit7d40897215713b66997208ae9db966ae', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit831ceb98372a007e65852de0c9535277::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit7d40897215713b66997208ae9db966ae::getInitializer($loader));
$loader->setClassMapAuthoritative(true);
$loader->register(true);
$includeFiles = \Composer\Autoload\ComposerStaticInit831ceb98372a007e65852de0c9535277::$files;
$includeFiles = \Composer\Autoload\ComposerStaticInit7d40897215713b66997208ae9db966ae::$files;
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire831ceb98372a007e65852de0c9535277($fileIdentifier, $file);
composerRequire7d40897215713b66997208ae9db966ae($fileIdentifier, $file);
}
return $loader;
@ -46,7 +46,7 @@ class ComposerAutoloaderInit831ceb98372a007e65852de0c9535277
* @param string $file
* @return void
*/
function composerRequire831ceb98372a007e65852de0c9535277($fileIdentifier, $file)
function composerRequire7d40897215713b66997208ae9db966ae($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInit831ceb98372a007e65852de0c9535277
class ComposerStaticInit7d40897215713b66997208ae9db966ae
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
@ -2958,6 +2958,7 @@ class ComposerStaticInit831ceb98372a007e65852de0c9535277
'Rector\\TypeDeclaration\\Rector\\ClassMethod\\ReturnTypeFromStrictTypedPropertyRector' => __DIR__ . '/../..' . '/rules/TypeDeclaration/Rector/ClassMethod/ReturnTypeFromStrictTypedPropertyRector.php',
'Rector\\TypeDeclaration\\Rector\\Closure\\AddClosureReturnTypeRector' => __DIR__ . '/../..' . '/rules/TypeDeclaration/Rector/Closure/AddClosureReturnTypeRector.php',
'Rector\\TypeDeclaration\\Rector\\FunctionLike\\AddParamTypeSplFixedArrayRector' => __DIR__ . '/../..' . '/rules/TypeDeclaration/Rector/FunctionLike/AddParamTypeSplFixedArrayRector.php',
'Rector\\TypeDeclaration\\Rector\\FunctionLike\\AddReturnTypeDeclarationFromYieldsRector' => __DIR__ . '/../..' . '/rules/TypeDeclaration/Rector/FunctionLike/AddReturnTypeDeclarationFromYieldsRector.php',
'Rector\\TypeDeclaration\\Rector\\FunctionLike\\ParamTypeDeclarationRector' => __DIR__ . '/../..' . '/rules/TypeDeclaration/Rector/FunctionLike/ParamTypeDeclarationRector.php',
'Rector\\TypeDeclaration\\Rector\\FunctionLike\\ReturnTypeDeclarationRector' => __DIR__ . '/../..' . '/rules/TypeDeclaration/Rector/FunctionLike/ReturnTypeDeclarationRector.php',
'Rector\\TypeDeclaration\\Rector\\Param\\ParamTypeFromStrictTypedPropertyRector' => __DIR__ . '/../..' . '/rules/TypeDeclaration/Rector/Param/ParamTypeFromStrictTypedPropertyRector.php',
@ -2984,7 +2985,6 @@ class ComposerStaticInit831ceb98372a007e65852de0c9535277
'Rector\\TypeDeclaration\\TypeInferer\\ReturnTypeInferer' => __DIR__ . '/../..' . '/rules/TypeDeclaration/TypeInferer/ReturnTypeInferer.php',
'Rector\\TypeDeclaration\\TypeInferer\\ReturnTypeInferer\\ReturnTypeDeclarationReturnTypeInfererTypeInferer' => __DIR__ . '/../..' . '/rules/TypeDeclaration/TypeInferer/ReturnTypeInferer/ReturnTypeDeclarationReturnTypeInfererTypeInferer.php',
'Rector\\TypeDeclaration\\TypeInferer\\ReturnTypeInferer\\ReturnedNodesReturnTypeInfererTypeInferer' => __DIR__ . '/../..' . '/rules/TypeDeclaration/TypeInferer/ReturnTypeInferer/ReturnedNodesReturnTypeInfererTypeInferer.php',
'Rector\\TypeDeclaration\\TypeInferer\\ReturnTypeInferer\\YieldNodesReturnTypeInfererTypeInferer' => __DIR__ . '/../..' . '/rules/TypeDeclaration/TypeInferer/ReturnTypeInferer/YieldNodesReturnTypeInfererTypeInferer.php',
'Rector\\TypeDeclaration\\TypeInferer\\SilentVoidResolver' => __DIR__ . '/../..' . '/rules/TypeDeclaration/TypeInferer/SilentVoidResolver.php',
'Rector\\TypeDeclaration\\TypeInferer\\SplArrayFixedTypeNarrower' => __DIR__ . '/../..' . '/rules/TypeDeclaration/TypeInferer/SplArrayFixedTypeNarrower.php',
'Rector\\TypeDeclaration\\TypeInferer\\VarDocPropertyTypeInferer' => __DIR__ . '/../..' . '/rules/TypeDeclaration/TypeInferer/VarDocPropertyTypeInferer.php',
@ -3027,9 +3027,9 @@ class ComposerStaticInit831ceb98372a007e65852de0c9535277
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit831ceb98372a007e65852de0c9535277::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit831ceb98372a007e65852de0c9535277::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit831ceb98372a007e65852de0c9535277::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit7d40897215713b66997208ae9db966ae::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit7d40897215713b66997208ae9db966ae::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit7d40897215713b66997208ae9db966ae::$classMap;
}, null, ClassLoader::class);
}