Updated Rector to commit 70e4b3c51f

70e4b3c51f [EarlyReturn] Do not move up variable up next foreach on ChangeAndIfToEarlyReturnRector (#852)
This commit is contained in:
Tomas Votruba 2021-09-08 17:22:06 +00:00
parent d5b6ae034e
commit 7a65a9b047
6 changed files with 20 additions and 20 deletions

View File

@ -142,7 +142,7 @@ CODE_SAMPLE
$this->nodesToAddCollector->addNodeBeforeNode($if, $node);
}
$this->removeNode($node);
if (!$node->stmts[0] instanceof \PhpParser\Node\Stmt\Return_ && $ifNextReturnClone->expr instanceof \PhpParser\Node\Expr) {
if (!$node->stmts[0] instanceof \PhpParser\Node\Stmt\Return_ && $ifNextReturnClone->expr instanceof \PhpParser\Node\Expr && !$this->contextAnalyzer->isInLoop($node)) {
return [$node, $ifNextReturnClone];
}
return $node;

View File

@ -16,11 +16,11 @@ final class VersionResolver
/**
* @var string
*/
public const PACKAGE_VERSION = '5b17710c25ddb7cd75a31dfbf7bc2ed05072b6e8';
public const PACKAGE_VERSION = '70e4b3c51f3c5fde8120421948bc652df96a52e1';
/**
* @var string
*/
public const RELEASE_DATE = '2021-09-08 19:07:19';
public const RELEASE_DATE = '2021-09-08 19:07:40';
public static function resolvePackageVersion() : string
{
$process = new \RectorPrefix20210908\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__);

2
vendor/autoload.php vendored
View File

@ -4,4 +4,4 @@
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInitff6d460a6e24c36917861baacec99784::getLoader();
return ComposerAutoloaderInit9d7b816650fadd5735684fca972b4e4a::getLoader();

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInitff6d460a6e24c36917861baacec99784
class ComposerAutoloaderInit9d7b816650fadd5735684fca972b4e4a
{
private static $loader;
@ -22,15 +22,15 @@ class ComposerAutoloaderInitff6d460a6e24c36917861baacec99784
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInitff6d460a6e24c36917861baacec99784', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit9d7b816650fadd5735684fca972b4e4a', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInitff6d460a6e24c36917861baacec99784', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit9d7b816650fadd5735684fca972b4e4a', '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\ComposerStaticInitff6d460a6e24c36917861baacec99784::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit9d7b816650fadd5735684fca972b4e4a::getInitializer($loader));
} else {
$classMap = require __DIR__ . '/autoload_classmap.php';
if ($classMap) {
@ -42,19 +42,19 @@ class ComposerAutoloaderInitff6d460a6e24c36917861baacec99784
$loader->register(true);
if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInitff6d460a6e24c36917861baacec99784::$files;
$includeFiles = Composer\Autoload\ComposerStaticInit9d7b816650fadd5735684fca972b4e4a::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequireff6d460a6e24c36917861baacec99784($fileIdentifier, $file);
composerRequire9d7b816650fadd5735684fca972b4e4a($fileIdentifier, $file);
}
return $loader;
}
}
function composerRequireff6d460a6e24c36917861baacec99784($fileIdentifier, $file)
function composerRequire9d7b816650fadd5735684fca972b4e4a($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInitff6d460a6e24c36917861baacec99784
class ComposerStaticInit9d7b816650fadd5735684fca972b4e4a
{
public static $files = array (
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
@ -3856,9 +3856,9 @@ class ComposerStaticInitff6d460a6e24c36917861baacec99784
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitff6d460a6e24c36917861baacec99784::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitff6d460a6e24c36917861baacec99784::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitff6d460a6e24c36917861baacec99784::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit9d7b816650fadd5735684fca972b4e4a::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit9d7b816650fadd5735684fca972b4e4a::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit9d7b816650fadd5735684fca972b4e4a::$classMap;
}, null, ClassLoader::class);
}

View File

@ -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('RectorPrefix20210908\AutoloadIncluder');
}
if (!class_exists('ComposerAutoloaderInitff6d460a6e24c36917861baacec99784', false) && !interface_exists('ComposerAutoloaderInitff6d460a6e24c36917861baacec99784', false) && !trait_exists('ComposerAutoloaderInitff6d460a6e24c36917861baacec99784', false)) {
spl_autoload_call('RectorPrefix20210908\ComposerAutoloaderInitff6d460a6e24c36917861baacec99784');
if (!class_exists('ComposerAutoloaderInit9d7b816650fadd5735684fca972b4e4a', false) && !interface_exists('ComposerAutoloaderInit9d7b816650fadd5735684fca972b4e4a', false) && !trait_exists('ComposerAutoloaderInit9d7b816650fadd5735684fca972b4e4a', false)) {
spl_autoload_call('RectorPrefix20210908\ComposerAutoloaderInit9d7b816650fadd5735684fca972b4e4a');
}
if (!class_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !interface_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !trait_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false)) {
spl_autoload_call('RectorPrefix20210908\Helmich\TypoScriptParser\Parser\AST\Statement');
@ -3311,9 +3311,9 @@ if (!function_exists('print_node')) {
return \RectorPrefix20210908\print_node(...func_get_args());
}
}
if (!function_exists('composerRequireff6d460a6e24c36917861baacec99784')) {
function composerRequireff6d460a6e24c36917861baacec99784() {
return \RectorPrefix20210908\composerRequireff6d460a6e24c36917861baacec99784(...func_get_args());
if (!function_exists('composerRequire9d7b816650fadd5735684fca972b4e4a')) {
function composerRequire9d7b816650fadd5735684fca972b4e4a() {
return \RectorPrefix20210908\composerRequire9d7b816650fadd5735684fca972b4e4a(...func_get_args());
}
}
if (!function_exists('parseArgs')) {