Updated Rector to commit c8f697b16d888505c2bfbbcaba1665402091159b

c8f697b16d Remove ToStringToMethodCallRector as not practical and only for demo, FalseReturnClassMethodToNullableRector, as requires detailed custom refactoring (#3854)
This commit is contained in:
Tomas Votruba 2023-05-15 13:05:02 +00:00
parent 73738c0fb1
commit 1b8d2812ef
11 changed files with 17 additions and 393 deletions

View File

@ -36,7 +36,8 @@ use Rector\CodingStyle\Rector\Use_\SeparateMultiUseImportsRector;
use Rector\Config\RectorConfig;
use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector;
use Rector\Transform\Rector\FuncCall\FuncCallToConstFetchRector;
use Rector\Visibility\Rector\ClassMethod\ExplicitPublicClassMethodRector;
return static function (RectorConfig $rectorConfig) : void {
$rectorConfig->ruleWithConfiguration(FuncCallToConstFetchRector::class, ['php_sapi_name' => 'PHP_SAPI', 'pi' => 'M_PI']);
$rectorConfig->rules([SeparateMultiUseImportsRector::class, PostIncDecToPreIncDecRector::class, UnSpreadOperatorRector::class, NewlineAfterStatementRector::class, RemoveFinalFromConstRector::class, NullableCompareToNullRector::class, BinarySwitchToIfElseRector::class, ConsistentImplodeRector::class, TernaryConditionVariableAssignmentRector::class, SymplifyQuoteEscapeRector::class, StringClassNameToClassConstantRector::class, CatchExceptionNameMatchingTypeRector::class, UseIncrementAssignRector::class, SplitDoubleAssignRector::class, VarConstantCommentRector::class, EncapsedStringsToSprintfRector::class, WrapEncapsedVariableInCurlyBracesRector::class, NewlineBeforeNewAssignSetRector::class, AddArrayDefaultToArrayPropertyRector::class, MakeInheritedMethodVisibilitySameAsParentRector::class, CallUserFuncArrayToVariadicRector::class, VersionCompareFuncCallToConstantRector::class, StaticArrowFunctionRector::class, StaticClosureRector::class, CountArrayToEmptyArrayComparisonRector::class, CallUserFuncToMethodCallRector::class, FuncGetArgsToVariadicParamRector::class, StrictArraySearchRector::class, UseClassKeywordForClassNameResolutionRector::class, SplitGroupedPropertiesRector::class, SplitGroupedClassConstantsRector::class]);
$rectorConfig->rules([SeparateMultiUseImportsRector::class, PostIncDecToPreIncDecRector::class, UnSpreadOperatorRector::class, NewlineAfterStatementRector::class, RemoveFinalFromConstRector::class, NullableCompareToNullRector::class, BinarySwitchToIfElseRector::class, ConsistentImplodeRector::class, TernaryConditionVariableAssignmentRector::class, SymplifyQuoteEscapeRector::class, StringClassNameToClassConstantRector::class, CatchExceptionNameMatchingTypeRector::class, UseIncrementAssignRector::class, SplitDoubleAssignRector::class, VarConstantCommentRector::class, EncapsedStringsToSprintfRector::class, WrapEncapsedVariableInCurlyBracesRector::class, NewlineBeforeNewAssignSetRector::class, AddArrayDefaultToArrayPropertyRector::class, MakeInheritedMethodVisibilitySameAsParentRector::class, CallUserFuncArrayToVariadicRector::class, VersionCompareFuncCallToConstantRector::class, StaticArrowFunctionRector::class, StaticClosureRector::class, CountArrayToEmptyArrayComparisonRector::class, CallUserFuncToMethodCallRector::class, FuncGetArgsToVariadicParamRector::class, StrictArraySearchRector::class, UseClassKeywordForClassNameResolutionRector::class, SplitGroupedPropertiesRector::class, SplitGroupedClassConstantsRector::class, ExplicitPublicClassMethodRector::class]);
};

View File

@ -1,4 +1,4 @@
# 405 Rules Overview
# 403 Rules Overview
<br>
@ -60,9 +60,9 @@
- [Strict](#strict) (6)
- [Transform](#transform) (30)
- [Transform](#transform) (29)
- [TypeDeclaration](#typedeclaration) (40)
- [TypeDeclaration](#typedeclaration) (39)
- [Visibility](#visibility) (3)
@ -8617,41 +8617,6 @@ return static function (RectorConfig $rectorConfig): void {
<br>
### ToStringToMethodCallRector
Turns defined code uses of `"__toString()"` method to specific method calls.
:wrench: **configure it!**
- class: [`Rector\Transform\Rector\String_\ToStringToMethodCallRector`](../rules/Transform/Rector/String_/ToStringToMethodCallRector.php)
```php
<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\Transform\Rector\String_\ToStringToMethodCallRector;
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->ruleWithConfiguration(ToStringToMethodCallRector::class, [
'SomeObject' => 'getPath',
]);
};
```
```diff
$someValue = new SomeObject;
-$result = (string) $someValue;
-$result = $someValue->__toString();
+$result = $someValue->getPath();
+$result = $someValue->getPath();
```
<br>
### UnsetAndIssetToMethodCallRector
Turns defined `__isset`/`__unset` calls to specific method calls.
@ -9139,33 +9104,6 @@ Change `empty()` on nullable object to instanceof check
<br>
### FalseReturnClassMethodToNullableRector
Change class method that returns false as invalid state, to nullable
- class: [`Rector\TypeDeclaration\Rector\ClassMethod\FalseReturnClassMethodToNullableRector`](../rules/TypeDeclaration/Rector/ClassMethod/FalseReturnClassMethodToNullableRector.php)
```diff
class SomeClass
{
- /**
- * @return false|int
- */
- public function run(int $number)
+ public function run(int $number): ?int
{
if ($number === 10) {
- return false;
+ return null;
}
return $number;
}
}
```
<br>
### FlipNegatedTernaryInstanceofRector
Flip negated ternary of instanceof to direct use of object

View File

@ -1,90 +0,0 @@
<?php
declare (strict_types=1);
namespace Rector\Transform\Rector\String_;
use PhpParser\Node;
use PhpParser\Node\Expr\Cast\String_;
use PhpParser\Node\Expr\MethodCall;
use PhpParser\Node\Identifier;
use PHPStan\Type\ObjectType;
use Rector\Core\Contract\Rector\ConfigurableRectorInterface;
use Rector\Core\Rector\AbstractRector;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
use RectorPrefix202305\Webmozart\Assert\Assert;
/**
* @see \Rector\Tests\Transform\Rector\String_\ToStringToMethodCallRector\ToStringToMethodCallRectorTest
*/
final class ToStringToMethodCallRector extends AbstractRector implements ConfigurableRectorInterface
{
/**
* @var array<string, string>
*/
private $methodNamesByType = [];
public function getRuleDefinition() : RuleDefinition
{
return new RuleDefinition('Turns defined code uses of "__toString()" method to specific method calls.', [new ConfiguredCodeSample(<<<'CODE_SAMPLE'
$someValue = new SomeObject;
$result = (string) $someValue;
$result = $someValue->__toString();
CODE_SAMPLE
, <<<'CODE_SAMPLE'
$someValue = new SomeObject;
$result = $someValue->getPath();
$result = $someValue->getPath();
CODE_SAMPLE
, ['SomeObject' => 'getPath'])]);
}
/**
* @return array<class-string<Node>>
*/
public function getNodeTypes() : array
{
return [String_::class, MethodCall::class];
}
/**
* @param String_|MethodCall $node
*/
public function refactor(Node $node) : ?Node
{
if ($node instanceof String_) {
return $this->processStringNode($node);
}
return $this->processMethodCall($node);
}
/**
* @param mixed[] $configuration
*/
public function configure(array $configuration) : void
{
Assert::allString(\array_keys($configuration));
Assert::allString($configuration);
/** @var array<string, string> $configuration */
$this->methodNamesByType = $configuration;
}
private function processStringNode(String_ $string) : ?Node
{
foreach ($this->methodNamesByType as $type => $methodName) {
if (!$this->isObjectType($string->expr, new ObjectType($type))) {
continue;
}
return $this->nodeFactory->createMethodCall($string->expr, $methodName);
}
return null;
}
private function processMethodCall(MethodCall $methodCall) : ?Node
{
foreach ($this->methodNamesByType as $type => $methodName) {
if (!$this->isName($methodCall->name, '__toString')) {
continue;
}
if (!$this->isObjectType($methodCall->var, new ObjectType($type))) {
continue;
}
$methodCall->name = new Identifier($methodName);
return $methodCall;
}
return null;
}
}

View File

@ -1,56 +0,0 @@
<?php
declare (strict_types=1);
namespace Rector\TypeDeclaration\Matcher;
use PhpParser\Node\Expr;
use PhpParser\Node\Stmt\ClassMethod;
use PhpParser\Node\Stmt\Return_;
use Rector\Core\PhpParser\Node\BetterNodeFinder;
use Rector\Core\PhpParser\Node\Value\ValueResolver;
use Rector\TypeDeclaration\ValueObject\ReturnFalseAndReturnOther;
final class ReturnFalseAndReturnOtherMatcher
{
/**
* @readonly
* @var \Rector\Core\PhpParser\Node\BetterNodeFinder
*/
private $betterNodeFinder;
/**
* @readonly
* @var \Rector\Core\PhpParser\Node\Value\ValueResolver
*/
private $valueResolver;
public function __construct(BetterNodeFinder $betterNodeFinder, ValueResolver $valueResolver)
{
$this->betterNodeFinder = $betterNodeFinder;
$this->valueResolver = $valueResolver;
}
public function match(ClassMethod $classMethod) : ?ReturnFalseAndReturnOther
{
// there are 2 returns, one with false, other with something else except true
/** @var Return_[] $returns */
$returns = $this->betterNodeFinder->findInstancesOfInFunctionLikeScoped($classMethod, Return_::class);
if (\count($returns) !== 2) {
return null;
}
$firstReturn = $returns[0];
$secondReturn = $returns[1];
if (!$firstReturn->expr instanceof Expr) {
return null;
}
if (!$secondReturn->expr instanceof Expr) {
return null;
}
if ($this->valueResolver->isFalse($firstReturn->expr) && !$this->valueResolver->isTrueOrFalse($secondReturn->expr)) {
return new ReturnFalseAndReturnOther($firstReturn, $secondReturn);
}
if (!$this->valueResolver->isFalse($secondReturn->expr)) {
return null;
}
if ($this->valueResolver->isTrueOrFalse($firstReturn->expr)) {
return null;
}
return new ReturnFalseAndReturnOther($secondReturn, $firstReturn);
}
}

View File

@ -1,129 +0,0 @@
<?php
declare (strict_types=1);
namespace Rector\TypeDeclaration\Rector\ClassMethod;
use PhpParser\Node;
use PhpParser\Node\Identifier;
use PhpParser\Node\Name;
use PhpParser\Node\NullableType;
use PhpParser\Node\Stmt\ClassMethod;
use PHPStan\PhpDocParser\Ast\PhpDoc\ReturnTagValueNode;
use PHPStan\Type\MixedType;
use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo;
use Rector\Core\Rector\AbstractRector;
use Rector\PHPStanStaticTypeMapper\Enum\TypeKind;
use Rector\TypeDeclaration\Matcher\ReturnFalseAndReturnOtherMatcher;
use Rector\TypeDeclaration\ValueObject\ReturnFalseAndReturnOther;
use Rector\VendorLocker\NodeVendorLocker\ClassMethodReturnTypeOverrideGuard;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @see \Rector\Tests\TypeDeclaration\Rector\ClassMethod\FalseReturnClassMethodToNullableRector\FalseReturnClassMethodToNullableRectorTest
*/
final class FalseReturnClassMethodToNullableRector extends AbstractRector
{
/**
* @readonly
* @var \Rector\VendorLocker\NodeVendorLocker\ClassMethodReturnTypeOverrideGuard
*/
private $classMethodReturnTypeOverrideGuard;
/**
* @readonly
* @var \Rector\TypeDeclaration\Matcher\ReturnFalseAndReturnOtherMatcher
*/
private $returnFalseAndReturnOtherMatcher;
public function __construct(ClassMethodReturnTypeOverrideGuard $classMethodReturnTypeOverrideGuard, ReturnFalseAndReturnOtherMatcher $returnFalseAndReturnOtherMatcher)
{
$this->classMethodReturnTypeOverrideGuard = $classMethodReturnTypeOverrideGuard;
$this->returnFalseAndReturnOtherMatcher = $returnFalseAndReturnOtherMatcher;
}
public function getRuleDefinition() : RuleDefinition
{
return new RuleDefinition('Change class method that returns false as invalid state, to nullable', [new CodeSample(<<<'CODE_SAMPLE'
class SomeClass
{
/**
* @return false|int
*/
public function run(int $number)
{
if ($number === 10) {
return false;
}
return $number;
}
}
CODE_SAMPLE
, <<<'CODE_SAMPLE'
class SomeClass
{
public function run(int $number): ?int
{
if ($number === 10) {
return null;
}
return $number;
}
}
CODE_SAMPLE
)]);
}
/**
* @return array<class-string<Node>>
*/
public function getNodeTypes() : array
{
return [ClassMethod::class];
}
/**
* @param ClassMethod $node
*/
public function refactor(Node $node) : ?Node
{
// it already has a type
if ($node->returnType instanceof Node) {
return null;
}
if ($this->classMethodReturnTypeOverrideGuard->shouldSkipClassMethod($node)) {
return null;
}
$returnFalseAndReturnOther = $this->returnFalseAndReturnOtherMatcher->match($node);
if (!$returnFalseAndReturnOther instanceof ReturnFalseAndReturnOther) {
return null;
}
$falseReturn = $returnFalseAndReturnOther->getFalseReturn();
$otherReturn = $returnFalseAndReturnOther->getOtherReturn();
$anotherType = $this->getType($otherReturn->expr);
if ($anotherType instanceof MixedType) {
return null;
}
$typeNode = $this->staticTypeMapper->mapPHPStanTypeToPhpParserNode($anotherType, TypeKind::RETURN);
if (!$typeNode instanceof Name && !$typeNode instanceof Identifier) {
return null;
}
$node->returnType = new NullableType($typeNode);
$this->clearReturnPhpDocTagNode($node);
// update return node
$falseReturn->expr = $this->nodeFactory->createNull();
return $node;
}
private function clearReturnPhpDocTagNode(ClassMethod $classMethod) : void
{
$phpDocInfo = $this->phpDocInfoFactory->createFromNode($classMethod);
if (!$phpDocInfo instanceof PhpDocInfo) {
return;
}
$returnTagValueNode = $phpDocInfo->getReturnTagValue();
if (!$returnTagValueNode instanceof ReturnTagValueNode) {
return;
}
if ($returnTagValueNode->description !== '') {
// keep as useful
return;
}
$phpDocInfo->removeByType(ReturnTagValueNode::class);
}
}

View File

@ -1,32 +0,0 @@
<?php
declare (strict_types=1);
namespace Rector\TypeDeclaration\ValueObject;
use PhpParser\Node\Stmt\Return_;
final class ReturnFalseAndReturnOther
{
/**
* @readonly
* @var \PhpParser\Node\Stmt\Return_
*/
private $falseReturn;
/**
* @readonly
* @var \PhpParser\Node\Stmt\Return_
*/
private $otherReturn;
public function __construct(Return_ $falseReturn, Return_ $otherReturn)
{
$this->falseReturn = $falseReturn;
$this->otherReturn = $otherReturn;
}
public function getFalseReturn() : Return_
{
return $this->falseReturn;
}
public function getOtherReturn() : Return_
{
return $this->otherReturn;
}
}

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '3df70bdd234efe4c6f49607df5378fb150b111e7';
public const PACKAGE_VERSION = 'c8f697b16d888505c2bfbbcaba1665402091159b';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-05-15 12:57:00';
public const RELEASE_DATE = '2023-05-15 13:00:10';
/**
* @var int
*/

2
vendor/autoload.php vendored
View File

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

View File

@ -2715,7 +2715,6 @@ return array(
'Rector\\Transform\\Rector\\StaticCall\\StaticCallToMethodCallRector' => $baseDir . '/rules/Transform/Rector/StaticCall/StaticCallToMethodCallRector.php',
'Rector\\Transform\\Rector\\StaticCall\\StaticCallToNewRector' => $baseDir . '/rules/Transform/Rector/StaticCall/StaticCallToNewRector.php',
'Rector\\Transform\\Rector\\String_\\StringToClassConstantRector' => $baseDir . '/rules/Transform/Rector/String_/StringToClassConstantRector.php',
'Rector\\Transform\\Rector\\String_\\ToStringToMethodCallRector' => $baseDir . '/rules/Transform/Rector/String_/ToStringToMethodCallRector.php',
'Rector\\Transform\\ValueObject\\AttributeKeyToClassConstFetch' => $baseDir . '/rules/Transform/ValueObject/AttributeKeyToClassConstFetch.php',
'Rector\\Transform\\ValueObject\\ClassMethodReference' => $baseDir . '/rules/Transform/ValueObject/ClassMethodReference.php',
'Rector\\Transform\\ValueObject\\FuncCallToMethodCall' => $baseDir . '/rules/Transform/ValueObject/FuncCallToMethodCall.php',
@ -2747,7 +2746,6 @@ return array(
'Rector\\TypeDeclaration\\Guard\\PropertyTypeOverrideGuard' => $baseDir . '/rules/TypeDeclaration/Guard/PropertyTypeOverrideGuard.php',
'Rector\\TypeDeclaration\\Helper\\PhpDocNullableTypeHelper' => $baseDir . '/rules/TypeDeclaration/Helper/PhpDocNullableTypeHelper.php',
'Rector\\TypeDeclaration\\Matcher\\PropertyAssignMatcher' => $baseDir . '/rules/TypeDeclaration/Matcher/PropertyAssignMatcher.php',
'Rector\\TypeDeclaration\\Matcher\\ReturnFalseAndReturnOtherMatcher' => $baseDir . '/rules/TypeDeclaration/Matcher/ReturnFalseAndReturnOtherMatcher.php',
'Rector\\TypeDeclaration\\NodeAnalyzer\\AutowiredClassMethodOrPropertyAnalyzer' => $baseDir . '/rules/TypeDeclaration/NodeAnalyzer/AutowiredClassMethodOrPropertyAnalyzer.php',
'Rector\\TypeDeclaration\\NodeAnalyzer\\CallTypesResolver' => $baseDir . '/rules/TypeDeclaration/NodeAnalyzer/CallTypesResolver.php',
'Rector\\TypeDeclaration\\NodeAnalyzer\\CallerParamMatcher' => $baseDir . '/rules/TypeDeclaration/NodeAnalyzer/CallerParamMatcher.php',
@ -2778,7 +2776,6 @@ return array(
'Rector\\TypeDeclaration\\Rector\\ClassMethod\\AddReturnTypeDeclarationRector' => $baseDir . '/rules/TypeDeclaration/Rector/ClassMethod/AddReturnTypeDeclarationRector.php',
'Rector\\TypeDeclaration\\Rector\\ClassMethod\\AddVoidReturnTypeWhereNoReturnRector' => $baseDir . '/rules/TypeDeclaration/Rector/ClassMethod/AddVoidReturnTypeWhereNoReturnRector.php',
'Rector\\TypeDeclaration\\Rector\\ClassMethod\\ArrayShapeFromConstantArrayReturnRector' => $baseDir . '/rules/TypeDeclaration/Rector/ClassMethod/ArrayShapeFromConstantArrayReturnRector.php',
'Rector\\TypeDeclaration\\Rector\\ClassMethod\\FalseReturnClassMethodToNullableRector' => $baseDir . '/rules/TypeDeclaration/Rector/ClassMethod/FalseReturnClassMethodToNullableRector.php',
'Rector\\TypeDeclaration\\Rector\\ClassMethod\\ParamAnnotationIncorrectNullableRector' => $baseDir . '/rules/TypeDeclaration/Rector/ClassMethod/ParamAnnotationIncorrectNullableRector.php',
'Rector\\TypeDeclaration\\Rector\\ClassMethod\\ParamTypeByMethodCallTypeRector' => $baseDir . '/rules/TypeDeclaration/Rector/ClassMethod/ParamTypeByMethodCallTypeRector.php',
'Rector\\TypeDeclaration\\Rector\\ClassMethod\\ParamTypeByParentCallTypeRector' => $baseDir . '/rules/TypeDeclaration/Rector/ClassMethod/ParamTypeByParentCallTypeRector.php',
@ -2829,7 +2826,6 @@ return array(
'Rector\\TypeDeclaration\\ValueObject\\AddReturnTypeDeclaration' => $baseDir . '/rules/TypeDeclaration/ValueObject/AddReturnTypeDeclaration.php',
'Rector\\TypeDeclaration\\ValueObject\\AssignToVariable' => $baseDir . '/rules/TypeDeclaration/ValueObject/AssignToVariable.php',
'Rector\\TypeDeclaration\\ValueObject\\NestedArrayType' => $baseDir . '/rules/TypeDeclaration/ValueObject/NestedArrayType.php',
'Rector\\TypeDeclaration\\ValueObject\\ReturnFalseAndReturnOther' => $baseDir . '/rules/TypeDeclaration/ValueObject/ReturnFalseAndReturnOther.php',
'Rector\\TypeDeclaration\\ValueObject\\TernaryIfElseTypes' => $baseDir . '/rules/TypeDeclaration/ValueObject/TernaryIfElseTypes.php',
'Rector\\ValueObject\\ClassMethodWillChangeReturnType' => $vendorDir . '/rector/rector-downgrade-php/src/ValueObject/ClassMethodWillChangeReturnType.php',
'Rector\\VendorLocker\\NodeVendorLocker\\ClassMethodParamVendorLockResolver' => $baseDir . '/packages/VendorLocker/NodeVendorLocker/ClassMethodParamVendorLockResolver.php',

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit90591f1fd31a62e945310977dc81d00a
class ComposerAutoloaderInitd9c7b52d17fd90a28cff22e2d587297f
{
private static $loader;
@ -22,17 +22,17 @@ class ComposerAutoloaderInit90591f1fd31a62e945310977dc81d00a
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit90591f1fd31a62e945310977dc81d00a', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInitd9c7b52d17fd90a28cff22e2d587297f', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit90591f1fd31a62e945310977dc81d00a', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInitd9c7b52d17fd90a28cff22e2d587297f', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit90591f1fd31a62e945310977dc81d00a::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInitd9c7b52d17fd90a28cff22e2d587297f::getInitializer($loader));
$loader->setClassMapAuthoritative(true);
$loader->register(true);
$filesToLoad = \Composer\Autoload\ComposerStaticInit90591f1fd31a62e945310977dc81d00a::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInitd9c7b52d17fd90a28cff22e2d587297f::$files;
$requireFile = \Closure::bind(static function ($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 ComposerStaticInit90591f1fd31a62e945310977dc81d00a
class ComposerStaticInitd9c7b52d17fd90a28cff22e2d587297f
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
@ -2957,7 +2957,6 @@ class ComposerStaticInit90591f1fd31a62e945310977dc81d00a
'Rector\\Transform\\Rector\\StaticCall\\StaticCallToMethodCallRector' => __DIR__ . '/../..' . '/rules/Transform/Rector/StaticCall/StaticCallToMethodCallRector.php',
'Rector\\Transform\\Rector\\StaticCall\\StaticCallToNewRector' => __DIR__ . '/../..' . '/rules/Transform/Rector/StaticCall/StaticCallToNewRector.php',
'Rector\\Transform\\Rector\\String_\\StringToClassConstantRector' => __DIR__ . '/../..' . '/rules/Transform/Rector/String_/StringToClassConstantRector.php',
'Rector\\Transform\\Rector\\String_\\ToStringToMethodCallRector' => __DIR__ . '/../..' . '/rules/Transform/Rector/String_/ToStringToMethodCallRector.php',
'Rector\\Transform\\ValueObject\\AttributeKeyToClassConstFetch' => __DIR__ . '/../..' . '/rules/Transform/ValueObject/AttributeKeyToClassConstFetch.php',
'Rector\\Transform\\ValueObject\\ClassMethodReference' => __DIR__ . '/../..' . '/rules/Transform/ValueObject/ClassMethodReference.php',
'Rector\\Transform\\ValueObject\\FuncCallToMethodCall' => __DIR__ . '/../..' . '/rules/Transform/ValueObject/FuncCallToMethodCall.php',
@ -2989,7 +2988,6 @@ class ComposerStaticInit90591f1fd31a62e945310977dc81d00a
'Rector\\TypeDeclaration\\Guard\\PropertyTypeOverrideGuard' => __DIR__ . '/../..' . '/rules/TypeDeclaration/Guard/PropertyTypeOverrideGuard.php',
'Rector\\TypeDeclaration\\Helper\\PhpDocNullableTypeHelper' => __DIR__ . '/../..' . '/rules/TypeDeclaration/Helper/PhpDocNullableTypeHelper.php',
'Rector\\TypeDeclaration\\Matcher\\PropertyAssignMatcher' => __DIR__ . '/../..' . '/rules/TypeDeclaration/Matcher/PropertyAssignMatcher.php',
'Rector\\TypeDeclaration\\Matcher\\ReturnFalseAndReturnOtherMatcher' => __DIR__ . '/../..' . '/rules/TypeDeclaration/Matcher/ReturnFalseAndReturnOtherMatcher.php',
'Rector\\TypeDeclaration\\NodeAnalyzer\\AutowiredClassMethodOrPropertyAnalyzer' => __DIR__ . '/../..' . '/rules/TypeDeclaration/NodeAnalyzer/AutowiredClassMethodOrPropertyAnalyzer.php',
'Rector\\TypeDeclaration\\NodeAnalyzer\\CallTypesResolver' => __DIR__ . '/../..' . '/rules/TypeDeclaration/NodeAnalyzer/CallTypesResolver.php',
'Rector\\TypeDeclaration\\NodeAnalyzer\\CallerParamMatcher' => __DIR__ . '/../..' . '/rules/TypeDeclaration/NodeAnalyzer/CallerParamMatcher.php',
@ -3020,7 +3018,6 @@ class ComposerStaticInit90591f1fd31a62e945310977dc81d00a
'Rector\\TypeDeclaration\\Rector\\ClassMethod\\AddReturnTypeDeclarationRector' => __DIR__ . '/../..' . '/rules/TypeDeclaration/Rector/ClassMethod/AddReturnTypeDeclarationRector.php',
'Rector\\TypeDeclaration\\Rector\\ClassMethod\\AddVoidReturnTypeWhereNoReturnRector' => __DIR__ . '/../..' . '/rules/TypeDeclaration/Rector/ClassMethod/AddVoidReturnTypeWhereNoReturnRector.php',
'Rector\\TypeDeclaration\\Rector\\ClassMethod\\ArrayShapeFromConstantArrayReturnRector' => __DIR__ . '/../..' . '/rules/TypeDeclaration/Rector/ClassMethod/ArrayShapeFromConstantArrayReturnRector.php',
'Rector\\TypeDeclaration\\Rector\\ClassMethod\\FalseReturnClassMethodToNullableRector' => __DIR__ . '/../..' . '/rules/TypeDeclaration/Rector/ClassMethod/FalseReturnClassMethodToNullableRector.php',
'Rector\\TypeDeclaration\\Rector\\ClassMethod\\ParamAnnotationIncorrectNullableRector' => __DIR__ . '/../..' . '/rules/TypeDeclaration/Rector/ClassMethod/ParamAnnotationIncorrectNullableRector.php',
'Rector\\TypeDeclaration\\Rector\\ClassMethod\\ParamTypeByMethodCallTypeRector' => __DIR__ . '/../..' . '/rules/TypeDeclaration/Rector/ClassMethod/ParamTypeByMethodCallTypeRector.php',
'Rector\\TypeDeclaration\\Rector\\ClassMethod\\ParamTypeByParentCallTypeRector' => __DIR__ . '/../..' . '/rules/TypeDeclaration/Rector/ClassMethod/ParamTypeByParentCallTypeRector.php',
@ -3071,7 +3068,6 @@ class ComposerStaticInit90591f1fd31a62e945310977dc81d00a
'Rector\\TypeDeclaration\\ValueObject\\AddReturnTypeDeclaration' => __DIR__ . '/../..' . '/rules/TypeDeclaration/ValueObject/AddReturnTypeDeclaration.php',
'Rector\\TypeDeclaration\\ValueObject\\AssignToVariable' => __DIR__ . '/../..' . '/rules/TypeDeclaration/ValueObject/AssignToVariable.php',
'Rector\\TypeDeclaration\\ValueObject\\NestedArrayType' => __DIR__ . '/../..' . '/rules/TypeDeclaration/ValueObject/NestedArrayType.php',
'Rector\\TypeDeclaration\\ValueObject\\ReturnFalseAndReturnOther' => __DIR__ . '/../..' . '/rules/TypeDeclaration/ValueObject/ReturnFalseAndReturnOther.php',
'Rector\\TypeDeclaration\\ValueObject\\TernaryIfElseTypes' => __DIR__ . '/../..' . '/rules/TypeDeclaration/ValueObject/TernaryIfElseTypes.php',
'Rector\\ValueObject\\ClassMethodWillChangeReturnType' => __DIR__ . '/..' . '/rector/rector-downgrade-php/src/ValueObject/ClassMethodWillChangeReturnType.php',
'Rector\\VendorLocker\\NodeVendorLocker\\ClassMethodParamVendorLockResolver' => __DIR__ . '/../..' . '/packages/VendorLocker/NodeVendorLocker/ClassMethodParamVendorLockResolver.php',
@ -3105,9 +3101,9 @@ class ComposerStaticInit90591f1fd31a62e945310977dc81d00a
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit90591f1fd31a62e945310977dc81d00a::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit90591f1fd31a62e945310977dc81d00a::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit90591f1fd31a62e945310977dc81d00a::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInitd9c7b52d17fd90a28cff22e2d587297f::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitd9c7b52d17fd90a28cff22e2d587297f::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitd9c7b52d17fd90a28cff22e2d587297f::$classMap;
}, null, ClassLoader::class);
}