From 65a21970aaca09e58c60c6572a82c6b10ef10ab5 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Thu, 15 Jul 2021 10:36:02 +0000 Subject: [PATCH] Updated Rector to commit f7ba2752e3c9731621d9b81e535dc7d998c4aa1d https://github.com/rectorphp/rector-src/commit/f7ba2752e3c9731621d9b81e535dc7d998c4aa1d Cleanup (#438) --- config/set/code-quality-strict.php | 2 - config/set/dead-code.php | 3 + .../MethodCallToVariableNameResolver.php | 141 ------------------ ...veOutMethodCallInsideIfConditionRector.php | 139 ----------------- .../ClassMethod/RemoveLastReturnRector.php | 83 +++++++++++ .../MethodCall/IncreaseColumnIndexRector.php | 6 +- src/Application/VersionResolver.php | 4 +- vendor/autoload.php | 2 +- vendor/composer/autoload_classmap.php | 3 +- vendor/composer/autoload_real.php | 14 +- vendor/composer/autoload_static.php | 11 +- vendor/scoper-autoload.php | 10 +- 12 files changed, 111 insertions(+), 307 deletions(-) delete mode 100644 rules/CodeQuality/Naming/MethodCallToVariableNameResolver.php delete mode 100644 rules/CodeQualityStrict/Rector/If_/MoveOutMethodCallInsideIfConditionRector.php create mode 100644 rules/DeadCode/Rector/ClassMethod/RemoveLastReturnRector.php diff --git a/config/set/code-quality-strict.php b/config/set/code-quality-strict.php index 893a488631c..58813c09488 100644 --- a/config/set/code-quality-strict.php +++ b/config/set/code-quality-strict.php @@ -4,14 +4,12 @@ declare (strict_types=1); namespace RectorPrefix20210715; use Rector\CodeQuality\Rector\Identical\FlipTypeControlToUseExclusiveTypeRector; -use Rector\CodeQualityStrict\Rector\If_\MoveOutMethodCallInsideIfConditionRector; use Rector\CodeQualityStrict\Rector\Variable\MoveVariableDeclarationNearReferenceRector; use Rector\CodingStyle\Rector\FuncCall\CountArrayToEmptyArrayComparisonRector; use Rector\CodingStyle\Rector\MethodCall\UseMessageVariableForSprintfInSymfonyStyleRector; use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; return static function (\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void { $services = $containerConfigurator->services(); - $services->set(\Rector\CodeQualityStrict\Rector\If_\MoveOutMethodCallInsideIfConditionRector::class); $services->set(\Rector\CodingStyle\Rector\FuncCall\CountArrayToEmptyArrayComparisonRector::class); $services->set(\Rector\CodeQualityStrict\Rector\Variable\MoveVariableDeclarationNearReferenceRector::class); $services->set(\Rector\CodingStyle\Rector\MethodCall\UseMessageVariableForSprintfInSymfonyStyleRector::class); diff --git a/config/set/dead-code.php b/config/set/dead-code.php index 1c5e8fc05e5..eb2a2189339 100644 --- a/config/set/dead-code.php +++ b/config/set/dead-code.php @@ -15,9 +15,11 @@ use Rector\DeadCode\Rector\ClassConst\RemoveUnusedPrivateClassConstantRector; use Rector\DeadCode\Rector\ClassMethod\RemoveDeadConstructorRector; use Rector\DeadCode\Rector\ClassMethod\RemoveDelegatingParentCallRector; use Rector\DeadCode\Rector\ClassMethod\RemoveEmptyClassMethodRector; +use Rector\DeadCode\Rector\ClassMethod\RemoveLastReturnRector; use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedConstructorParamRector; use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPrivateMethodParameterRector; use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPrivateMethodRector; +use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPromotedPropertyRector; use Rector\DeadCode\Rector\ClassMethod\RemoveUselessParamTagRector; use Rector\DeadCode\Rector\ClassMethod\RemoveUselessReturnTagRector; use Rector\DeadCode\Rector\Concat\RemoveConcatAutocastRector; @@ -94,4 +96,5 @@ return static function (\Symfony\Component\DependencyInjection\Loader\Configurat $services->set(\Rector\DeadCode\Rector\ClassMethod\RemoveUselessReturnTagRector::class); $services->set(\Rector\DeadCode\Rector\Node\RemoveNonExistingVarAnnotationRector::class); $services->set(\Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPromotedPropertyRector::class); + $services->set(\Rector\DeadCode\Rector\ClassMethod\RemoveLastReturnRector::class); }; diff --git a/rules/CodeQuality/Naming/MethodCallToVariableNameResolver.php b/rules/CodeQuality/Naming/MethodCallToVariableNameResolver.php deleted file mode 100644 index 3d89073a19b..00000000000 --- a/rules/CodeQuality/Naming/MethodCallToVariableNameResolver.php +++ /dev/null @@ -1,141 +0,0 @@ -nodeNameResolver = $nodeNameResolver; - $this->expectedNameResolver = $expectedNameResolver; - } - /** - * @todo decouple to collector by arg type - */ - public function resolveVariableName(\PhpParser\Node\Expr\MethodCall $methodCall) : ?string - { - $callerName = $this->nodeNameResolver->getName($methodCall->var); - $methodCallName = $this->nodeNameResolver->getName($methodCall->name); - if ($callerName === null) { - return null; - } - if ($methodCallName === null) { - return null; - } - $result = $this->getVariableName($methodCall, $callerName, $methodCallName); - if (!\RectorPrefix20210715\Nette\Utils\Strings::match($result, self::SPACE_REGEX)) { - return $result; - } - return $this->getFallbackVarName($callerName, $methodCallName); - } - private function getVariableName(\PhpParser\Node\Expr\MethodCall $methodCall, string $callerName, string $methodCallName) : string - { - $variableName = $this->expectedNameResolver->resolveForCall($methodCall); - if ($methodCall->args === [] && $variableName !== null && $variableName !== $callerName) { - return $variableName; - } - $fallbackVarName = $this->getFallbackVarName($callerName, $methodCallName); - $argValue = $methodCall->args[0]->value; - if ($argValue instanceof \PhpParser\Node\Expr\ClassConstFetch && $argValue->name instanceof \PhpParser\Node\Identifier) { - return $this->getClassConstFetchVarName($argValue, $methodCallName); - } - if ($argValue instanceof \PhpParser\Node\Scalar\String_) { - return $this->getStringVarName($argValue, $callerName, $fallbackVarName); - } - $argumentName = $this->nodeNameResolver->getName($argValue); - if (!$argValue instanceof \PhpParser\Node\Expr\Variable) { - return $fallbackVarName; - } - if ($argumentName === null) { - return $fallbackVarName; - } - if ($variableName === null) { - return $fallbackVarName; - } - return $argumentName . \ucfirst($variableName); - } - private function isNamespacedFunctionName(string $functionName) : bool - { - return \strpos($functionName, '\\') !== \false; - } - private function getFallbackVarName(string $callerName, string $methodCallName) : string - { - if ($this->isNamespacedFunctionName($callerName)) { - $callerName = \RectorPrefix20210715\Nette\Utils\Strings::after($callerName, '\\', -1); - } - return $callerName . \ucfirst($methodCallName); - } - private function getClassConstFetchVarName(\PhpParser\Node\Expr\ClassConstFetch $classConstFetch, string $methodCallName) : string - { - /** @var Identifier $name */ - $name = $classConstFetch->name; - $argValueName = \strtolower($name->toString()); - if ($argValueName !== 'class') { - return \RectorPrefix20210715\Nette\Utils\Strings::replace($argValueName, self::CONSTANT_REGEX, function ($matches) : string { - return \strtoupper($matches[2]); - }); - } - if ($classConstFetch->class instanceof \PhpParser\Node\Name) { - return $this->normalizeStringVariableName($methodCallName) . $classConstFetch->class->getLast(); - } - return $this->normalizeStringVariableName($methodCallName); - } - private function getStringVarName(\PhpParser\Node\Scalar\String_ $string, string $callerName, string $fallbackVarName) : string - { - $normalizeStringVariableName = $this->normalizeStringVariableName($string->value . \ucfirst($fallbackVarName)); - if (!\RectorPrefix20210715\Nette\Utils\Strings::match($normalizeStringVariableName, self::START_ALPHA_REGEX)) { - return $fallbackVarName; - } - if ($normalizeStringVariableName === $callerName) { - return $fallbackVarName; - } - return $normalizeStringVariableName; - } - private function normalizeStringVariableName(string $string) : string - { - if (!\RectorPrefix20210715\Nette\Utils\Strings::match($string, self::VALID_STRING_VARIABLE_REGEX)) { - return ''; - } - $get = \str_ireplace('get', '', $string); - $by = \str_ireplace('by', '', $get); - return \str_replace('-', '', $by); - } -} diff --git a/rules/CodeQualityStrict/Rector/If_/MoveOutMethodCallInsideIfConditionRector.php b/rules/CodeQualityStrict/Rector/If_/MoveOutMethodCallInsideIfConditionRector.php deleted file mode 100644 index c0307648325..00000000000 --- a/rules/CodeQualityStrict/Rector/If_/MoveOutMethodCallInsideIfConditionRector.php +++ /dev/null @@ -1,139 +0,0 @@ -methodCallToVariableNameResolver = $methodCallToVariableNameResolver; - } - public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition - { - return new \Symplify\RuleDocGenerator\ValueObject\RuleDefinition('Move out method call inside If condition', [new \Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample(<<<'CODE_SAMPLE' -if ($obj->run($arg) === 1) { - -} -CODE_SAMPLE -, <<<'CODE_SAMPLE' -$objRun = $obj->run($arg); -if ($objRun === 1) { - -} -CODE_SAMPLE -)]); - } - /** - * @return array> - */ - public function getNodeTypes() : array - { - return [\PhpParser\Node\Stmt\If_::class]; - } - /** - * @param If_ $node - */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node - { - /** @var MethodCall[] $methodCalls */ - $methodCalls = $this->betterNodeFinder->findInstanceOf($node->cond, \PhpParser\Node\Expr\MethodCall::class); - $countMethodCalls = \count($methodCalls); - // No method call or Multiple method calls inside if → skip - if ($countMethodCalls !== 1) { - return null; - } - $methodCall = $methodCalls[0]; - if ($this->shouldSkipMethodCall($methodCall)) { - return null; - } - return $this->moveOutMethodCall($methodCall, $node); - } - private function shouldSkipMethodCall(\PhpParser\Node\Expr\MethodCall $methodCall) : bool - { - $variableType = $this->getStaticType($methodCall->var); - // From PropertyFetch → skip - if ($variableType instanceof \PHPStan\Type\ThisType) { - return \true; - } - $methodCallReturnType = $this->getStaticType($methodCall); - if ($methodCallReturnType instanceof \PHPStan\Type\BooleanType) { - return \true; - } - // No Args → skip - if ($methodCall->args === []) { - return \true; - } - // Inside Method calls args has Method Call again → skip - return $this->isInsideMethodCallHasMethodCall($methodCall); - } - private function moveOutMethodCall(\PhpParser\Node\Expr\MethodCall $methodCall, \PhpParser\Node\Stmt\If_ $if) : ?\PhpParser\Node\Stmt\If_ - { - $hasParentAssign = (bool) $this->betterNodeFinder->findParentType($methodCall, \PhpParser\Node\Expr\Assign::class); - if ($hasParentAssign) { - return null; - } - $variableName = $this->methodCallToVariableNameResolver->resolveVariableName($methodCall); - if ($variableName === null) { - return null; - } - if ($this->isVariableNameAlreadyDefined($if, $variableName)) { - return null; - } - $variable = new \PhpParser\Node\Expr\Variable($variableName); - $methodCallAssign = new \PhpParser\Node\Expr\Assign($variable, $methodCall); - $this->addNodebeforeNode($methodCallAssign, $if); - // replace if cond with variable - if ($if->cond === $methodCall) { - $if->cond = $variable; - return $if; - } - // replace method call with variable - $this->traverseNodesWithCallable($if->cond, function (\PhpParser\Node $node) use($variable) : ?Variable { - if ($node instanceof \PhpParser\Node\Expr\MethodCall) { - return $variable; - } - return null; - }); - return $if; - } - private function isInsideMethodCallHasMethodCall(\PhpParser\Node\Expr\MethodCall $methodCall) : bool - { - foreach ($methodCall->args as $arg) { - if ($arg->value instanceof \PhpParser\Node\Expr\MethodCall) { - return \true; - } - } - return \false; - } - private function isVariableNameAlreadyDefined(\PhpParser\Node\Stmt\If_ $if, string $variableName) : bool - { - $scope = $if->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::SCOPE); - if (!$scope instanceof \PHPStan\Analyser\Scope) { - return \false; - } - return $scope->hasVariableType($variableName)->yes(); - } -} diff --git a/rules/DeadCode/Rector/ClassMethod/RemoveLastReturnRector.php b/rules/DeadCode/Rector/ClassMethod/RemoveLastReturnRector.php new file mode 100644 index 00000000000..e30453c2531 --- /dev/null +++ b/rules/DeadCode/Rector/ClassMethod/RemoveLastReturnRector.php @@ -0,0 +1,83 @@ +contextAnalyzer = $contextAnalyzer; + } + public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition + { + return new \Symplify\RuleDocGenerator\ValueObject\RuleDefinition('Remove very last `return` that has no meaning', [new \Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample(<<<'CODE_SAMPLE' +function some_function($value) +{ + if ($value === 1000) { + return; + } + + if ($value) { + return; + } +} +CODE_SAMPLE +, <<<'CODE_SAMPLE' +function some_function($value) +{ + if ($value === 1000) { + return; + } + + if ($value) { + } +} +CODE_SAMPLE +)]); + } + /** + * @return array> + */ + public function getNodeTypes() : array + { + return [\PhpParser\Node\Stmt\ClassMethod::class, \PhpParser\Node\Stmt\Function_::class]; + } + /** + * @param ClassMethod|Function_ $node + */ + public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + { + // last node and last return + $lastNode = $this->betterNodeFinder->findLastInstanceOf((array) $node->stmts, \PhpParser\Node::class); + $lastReturn = $this->betterNodeFinder->findLastInstanceOf((array) $node->stmts, \PhpParser\Node\Stmt\Return_::class); + if (!$lastReturn instanceof \PhpParser\Node\Stmt\Return_) { + return null; + } + if ($lastNode === null) { + return null; + } + if ($lastNode !== $lastReturn) { + return null; + } + if ($this->contextAnalyzer->isInLoop($lastReturn)) { + return null; + } + $this->removeNode($lastReturn); + return null; + } +} diff --git a/rules/PHPOffice/Rector/MethodCall/IncreaseColumnIndexRector.php b/rules/PHPOffice/Rector/MethodCall/IncreaseColumnIndexRector.php index 58f00db4a30..539e1f5b89c 100644 --- a/rules/PHPOffice/Rector/MethodCall/IncreaseColumnIndexRector.php +++ b/rules/PHPOffice/Rector/MethodCall/IncreaseColumnIndexRector.php @@ -22,7 +22,10 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; */ final class IncreaseColumnIndexRector extends \Rector\Core\Rector\AbstractRector { - public const ALREADY_CHANGED = 'already_changed'; + /** + * @var string + */ + private const ALREADY_CHANGED = 'already_changed'; /** * @var ObjectType[] */ @@ -105,7 +108,6 @@ CODE_SAMPLE } if ($binaryOp->right instanceof \PhpParser\Node\Scalar\LNumber) { ++$binaryOp->right->value; - return; } } private function findPreviousForWithVariable(\PhpParser\Node\Expr\Variable $variable) : ?\PhpParser\Node\Scalar\LNumber diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index a035b9b9faf..54fea935fd1 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -16,11 +16,11 @@ final class VersionResolver /** * @var string */ - public const PACKAGE_VERSION = 'bb16912ba40dc3523ddf77ccb6a2d00df2c7fafd'; + public const PACKAGE_VERSION = 'f7ba2752e3c9731621d9b81e535dc7d998c4aa1d'; /** * @var string */ - public const RELEASE_DATE = '2021-07-14 21:07:57'; + public const RELEASE_DATE = '2021-07-15 01:07:54'; public static function resolvePackageVersion() : string { $process = new \RectorPrefix20210715\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__); diff --git a/vendor/autoload.php b/vendor/autoload.php index db31d0c81b8..786198fd30a 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit0f5ffdaa51ee251b178165917f0550fe::getLoader(); +return ComposerAutoloaderInit2043d736b2ca689d52e4bedb374f5ad6::getLoader(); diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 1a6508248e5..593da4a0666 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -1598,11 +1598,9 @@ return array( 'Rector\\ChangesReporting\\ValueObjectFactory\\FileDiffFactory' => $baseDir . '/packages/ChangesReporting/ValueObjectFactory/FileDiffFactory.php', 'Rector\\ChangesReporting\\ValueObject\\RectorWithLineChange' => $baseDir . '/packages/ChangesReporting/ValueObject/RectorWithLineChange.php', 'Rector\\CodeQualityStrict\\NodeFactory\\ClassConstFetchFactory' => $baseDir . '/rules/CodeQualityStrict/NodeFactory/ClassConstFetchFactory.php', - 'Rector\\CodeQualityStrict\\Rector\\If_\\MoveOutMethodCallInsideIfConditionRector' => $baseDir . '/rules/CodeQualityStrict/Rector/If_/MoveOutMethodCallInsideIfConditionRector.php', 'Rector\\CodeQualityStrict\\Rector\\Variable\\MoveVariableDeclarationNearReferenceRector' => $baseDir . '/rules/CodeQualityStrict/Rector/Variable/MoveVariableDeclarationNearReferenceRector.php', 'Rector\\CodeQualityStrict\\TypeAnalyzer\\SubTypeAnalyzer' => $baseDir . '/rules/CodeQualityStrict/TypeAnalyzer/SubTypeAnalyzer.php', 'Rector\\CodeQuality\\CompactConverter' => $baseDir . '/rules/CodeQuality/CompactConverter.php', - 'Rector\\CodeQuality\\Naming\\MethodCallToVariableNameResolver' => $baseDir . '/rules/CodeQuality/Naming/MethodCallToVariableNameResolver.php', 'Rector\\CodeQuality\\NodeAnalyzer\\ArrayCompacter' => $baseDir . '/rules/CodeQuality/NodeAnalyzer/ArrayCompacter.php', 'Rector\\CodeQuality\\NodeAnalyzer\\ArrayItemsAnalyzer' => $baseDir . '/rules/CodeQuality/NodeAnalyzer/ArrayItemsAnalyzer.php', 'Rector\\CodeQuality\\NodeAnalyzer\\ClassLikeAnalyzer' => $baseDir . '/rules/CodeQuality/NodeAnalyzer/ClassLikeAnalyzer.php', @@ -1965,6 +1963,7 @@ return array( 'Rector\\DeadCode\\Rector\\ClassMethod\\RemoveDeadConstructorRector' => $baseDir . '/rules/DeadCode/Rector/ClassMethod/RemoveDeadConstructorRector.php', 'Rector\\DeadCode\\Rector\\ClassMethod\\RemoveDelegatingParentCallRector' => $baseDir . '/rules/DeadCode/Rector/ClassMethod/RemoveDelegatingParentCallRector.php', 'Rector\\DeadCode\\Rector\\ClassMethod\\RemoveEmptyClassMethodRector' => $baseDir . '/rules/DeadCode/Rector/ClassMethod/RemoveEmptyClassMethodRector.php', + 'Rector\\DeadCode\\Rector\\ClassMethod\\RemoveLastReturnRector' => $baseDir . '/rules/DeadCode/Rector/ClassMethod/RemoveLastReturnRector.php', 'Rector\\DeadCode\\Rector\\ClassMethod\\RemoveUnusedConstructorParamRector' => $baseDir . '/rules/DeadCode/Rector/ClassMethod/RemoveUnusedConstructorParamRector.php', 'Rector\\DeadCode\\Rector\\ClassMethod\\RemoveUnusedPrivateMethodParameterRector' => $baseDir . '/rules/DeadCode/Rector/ClassMethod/RemoveUnusedPrivateMethodParameterRector.php', 'Rector\\DeadCode\\Rector\\ClassMethod\\RemoveUnusedPrivateMethodRector' => $baseDir . '/rules/DeadCode/Rector/ClassMethod/RemoveUnusedPrivateMethodRector.php', diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 21f0cea71c0..4d4c4bed6a6 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit0f5ffdaa51ee251b178165917f0550fe +class ComposerAutoloaderInit2043d736b2ca689d52e4bedb374f5ad6 { private static $loader; @@ -22,15 +22,15 @@ class ComposerAutoloaderInit0f5ffdaa51ee251b178165917f0550fe return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit0f5ffdaa51ee251b178165917f0550fe', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit2043d736b2ca689d52e4bedb374f5ad6', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); - spl_autoload_unregister(array('ComposerAutoloaderInit0f5ffdaa51ee251b178165917f0550fe', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit2043d736b2ca689d52e4bedb374f5ad6', 'loadClassLoader')); $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); if ($useStaticLoader) { require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit0f5ffdaa51ee251b178165917f0550fe::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit2043d736b2ca689d52e4bedb374f5ad6::getInitializer($loader)); } else { $classMap = require __DIR__ . '/autoload_classmap.php'; if ($classMap) { @@ -42,19 +42,19 @@ class ComposerAutoloaderInit0f5ffdaa51ee251b178165917f0550fe $loader->register(true); if ($useStaticLoader) { - $includeFiles = Composer\Autoload\ComposerStaticInit0f5ffdaa51ee251b178165917f0550fe::$files; + $includeFiles = Composer\Autoload\ComposerStaticInit2043d736b2ca689d52e4bedb374f5ad6::$files; } else { $includeFiles = require __DIR__ . '/autoload_files.php'; } foreach ($includeFiles as $fileIdentifier => $file) { - composerRequire0f5ffdaa51ee251b178165917f0550fe($fileIdentifier, $file); + composerRequire2043d736b2ca689d52e4bedb374f5ad6($fileIdentifier, $file); } return $loader; } } -function composerRequire0f5ffdaa51ee251b178165917f0550fe($fileIdentifier, $file) +function composerRequire2043d736b2ca689d52e4bedb374f5ad6($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { require $file; diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 0c5cb4324fb..e9984127965 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit0f5ffdaa51ee251b178165917f0550fe +class ComposerStaticInit2043d736b2ca689d52e4bedb374f5ad6 { public static $files = array ( 'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php', @@ -1953,11 +1953,9 @@ class ComposerStaticInit0f5ffdaa51ee251b178165917f0550fe 'Rector\\ChangesReporting\\ValueObjectFactory\\FileDiffFactory' => __DIR__ . '/../..' . '/packages/ChangesReporting/ValueObjectFactory/FileDiffFactory.php', 'Rector\\ChangesReporting\\ValueObject\\RectorWithLineChange' => __DIR__ . '/../..' . '/packages/ChangesReporting/ValueObject/RectorWithLineChange.php', 'Rector\\CodeQualityStrict\\NodeFactory\\ClassConstFetchFactory' => __DIR__ . '/../..' . '/rules/CodeQualityStrict/NodeFactory/ClassConstFetchFactory.php', - 'Rector\\CodeQualityStrict\\Rector\\If_\\MoveOutMethodCallInsideIfConditionRector' => __DIR__ . '/../..' . '/rules/CodeQualityStrict/Rector/If_/MoveOutMethodCallInsideIfConditionRector.php', 'Rector\\CodeQualityStrict\\Rector\\Variable\\MoveVariableDeclarationNearReferenceRector' => __DIR__ . '/../..' . '/rules/CodeQualityStrict/Rector/Variable/MoveVariableDeclarationNearReferenceRector.php', 'Rector\\CodeQualityStrict\\TypeAnalyzer\\SubTypeAnalyzer' => __DIR__ . '/../..' . '/rules/CodeQualityStrict/TypeAnalyzer/SubTypeAnalyzer.php', 'Rector\\CodeQuality\\CompactConverter' => __DIR__ . '/../..' . '/rules/CodeQuality/CompactConverter.php', - 'Rector\\CodeQuality\\Naming\\MethodCallToVariableNameResolver' => __DIR__ . '/../..' . '/rules/CodeQuality/Naming/MethodCallToVariableNameResolver.php', 'Rector\\CodeQuality\\NodeAnalyzer\\ArrayCompacter' => __DIR__ . '/../..' . '/rules/CodeQuality/NodeAnalyzer/ArrayCompacter.php', 'Rector\\CodeQuality\\NodeAnalyzer\\ArrayItemsAnalyzer' => __DIR__ . '/../..' . '/rules/CodeQuality/NodeAnalyzer/ArrayItemsAnalyzer.php', 'Rector\\CodeQuality\\NodeAnalyzer\\ClassLikeAnalyzer' => __DIR__ . '/../..' . '/rules/CodeQuality/NodeAnalyzer/ClassLikeAnalyzer.php', @@ -2320,6 +2318,7 @@ class ComposerStaticInit0f5ffdaa51ee251b178165917f0550fe 'Rector\\DeadCode\\Rector\\ClassMethod\\RemoveDeadConstructorRector' => __DIR__ . '/../..' . '/rules/DeadCode/Rector/ClassMethod/RemoveDeadConstructorRector.php', 'Rector\\DeadCode\\Rector\\ClassMethod\\RemoveDelegatingParentCallRector' => __DIR__ . '/../..' . '/rules/DeadCode/Rector/ClassMethod/RemoveDelegatingParentCallRector.php', 'Rector\\DeadCode\\Rector\\ClassMethod\\RemoveEmptyClassMethodRector' => __DIR__ . '/../..' . '/rules/DeadCode/Rector/ClassMethod/RemoveEmptyClassMethodRector.php', + 'Rector\\DeadCode\\Rector\\ClassMethod\\RemoveLastReturnRector' => __DIR__ . '/../..' . '/rules/DeadCode/Rector/ClassMethod/RemoveLastReturnRector.php', 'Rector\\DeadCode\\Rector\\ClassMethod\\RemoveUnusedConstructorParamRector' => __DIR__ . '/../..' . '/rules/DeadCode/Rector/ClassMethod/RemoveUnusedConstructorParamRector.php', 'Rector\\DeadCode\\Rector\\ClassMethod\\RemoveUnusedPrivateMethodParameterRector' => __DIR__ . '/../..' . '/rules/DeadCode/Rector/ClassMethod/RemoveUnusedPrivateMethodParameterRector.php', 'Rector\\DeadCode\\Rector\\ClassMethod\\RemoveUnusedPrivateMethodRector' => __DIR__ . '/../..' . '/rules/DeadCode/Rector/ClassMethod/RemoveUnusedPrivateMethodRector.php', @@ -3847,9 +3846,9 @@ class ComposerStaticInit0f5ffdaa51ee251b178165917f0550fe public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit0f5ffdaa51ee251b178165917f0550fe::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit0f5ffdaa51ee251b178165917f0550fe::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit0f5ffdaa51ee251b178165917f0550fe::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInit2043d736b2ca689d52e4bedb374f5ad6::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit2043d736b2ca689d52e4bedb374f5ad6::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit2043d736b2ca689d52e4bedb374f5ad6::$classMap; }, null, ClassLoader::class); } diff --git a/vendor/scoper-autoload.php b/vendor/scoper-autoload.php index 863a734293f..a99f8f2efce 100644 --- a/vendor/scoper-autoload.php +++ b/vendor/scoper-autoload.php @@ -9,8 +9,8 @@ $loader = require_once __DIR__.'/autoload.php'; if (!class_exists('AutoloadIncluder', false) && !interface_exists('AutoloadIncluder', false) && !trait_exists('AutoloadIncluder', false)) { spl_autoload_call('RectorPrefix20210715\AutoloadIncluder'); } -if (!class_exists('ComposerAutoloaderInit0f5ffdaa51ee251b178165917f0550fe', false) && !interface_exists('ComposerAutoloaderInit0f5ffdaa51ee251b178165917f0550fe', false) && !trait_exists('ComposerAutoloaderInit0f5ffdaa51ee251b178165917f0550fe', false)) { - spl_autoload_call('RectorPrefix20210715\ComposerAutoloaderInit0f5ffdaa51ee251b178165917f0550fe'); +if (!class_exists('ComposerAutoloaderInit2043d736b2ca689d52e4bedb374f5ad6', false) && !interface_exists('ComposerAutoloaderInit2043d736b2ca689d52e4bedb374f5ad6', false) && !trait_exists('ComposerAutoloaderInit2043d736b2ca689d52e4bedb374f5ad6', false)) { + spl_autoload_call('RectorPrefix20210715\ComposerAutoloaderInit2043d736b2ca689d52e4bedb374f5ad6'); } if (!class_exists('Doctrine\Inflector\Inflector', false) && !interface_exists('Doctrine\Inflector\Inflector', false) && !trait_exists('Doctrine\Inflector\Inflector', false)) { spl_autoload_call('RectorPrefix20210715\Doctrine\Inflector\Inflector'); @@ -3308,9 +3308,9 @@ if (!function_exists('print_node')) { return \RectorPrefix20210715\print_node(...func_get_args()); } } -if (!function_exists('composerRequire0f5ffdaa51ee251b178165917f0550fe')) { - function composerRequire0f5ffdaa51ee251b178165917f0550fe() { - return \RectorPrefix20210715\composerRequire0f5ffdaa51ee251b178165917f0550fe(...func_get_args()); +if (!function_exists('composerRequire2043d736b2ca689d52e4bedb374f5ad6')) { + function composerRequire2043d736b2ca689d52e4bedb374f5ad6() { + return \RectorPrefix20210715\composerRequire2043d736b2ca689d52e4bedb374f5ad6(...func_get_args()); } } if (!function_exists('parseArgs')) {