From 3737ef475abbd4ab89811f2877ba258d5f8c3d02 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Sun, 3 Jul 2022 07:04:34 +0000 Subject: [PATCH] Updated Rector to commit 5972ff7417911319f1ce754636937cd07af2a04c https://github.com/rectorphp/rector-src/commit/5972ff7417911319f1ce754636937cd07af2a04c [EarlyReturn] Mirror comment on ReturnEarlyIfVariableRector (#2612) --- .../ReturnEarlyIfVariableRector.php | 1 + src/Application/VersionResolver.php | 4 ++-- src/NodeAnalyzer/VariableAnalyzer.php | 4 ++-- vendor/autoload.php | 2 +- vendor/composer/autoload_real.php | 14 +++++++------- vendor/composer/autoload_static.php | 8 ++++---- 6 files changed, 17 insertions(+), 16 deletions(-) diff --git a/rules/EarlyReturn/Rector/StmtsAwareInterface/ReturnEarlyIfVariableRector.php b/rules/EarlyReturn/Rector/StmtsAwareInterface/ReturnEarlyIfVariableRector.php index dfd596d12d4..c3257bf1f76 100644 --- a/rules/EarlyReturn/Rector/StmtsAwareInterface/ReturnEarlyIfVariableRector.php +++ b/rules/EarlyReturn/Rector/StmtsAwareInterface/ReturnEarlyIfVariableRector.php @@ -90,6 +90,7 @@ CODE_SAMPLE continue; } $if->stmts[0] = new Return_($assignedExpr); + $this->mirrorComments($if->stmts[0], $onlyIfStmt); return $node; } } diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 319ffb97852..3e145cc80ae 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -17,12 +17,12 @@ final class VersionResolver * @api * @var string */ - public const PACKAGE_VERSION = '153c037739a0154195b52d74217d5b025b3936ac'; + public const PACKAGE_VERSION = '5972ff7417911319f1ce754636937cd07af2a04c'; /** * @api * @var string */ - public const RELEASE_DATE = '2022-07-03 00:30:40'; + public const RELEASE_DATE = '2022-07-03 08:59:25'; /** * @var int */ diff --git a/src/NodeAnalyzer/VariableAnalyzer.php b/src/NodeAnalyzer/VariableAnalyzer.php index 4fd8fe1a955..255bdc6507a 100644 --- a/src/NodeAnalyzer/VariableAnalyzer.php +++ b/src/NodeAnalyzer/VariableAnalyzer.php @@ -56,7 +56,7 @@ final class VariableAnalyzer public function isUsedByReference(Variable $variable) : bool { return (bool) $this->betterNodeFinder->findFirstPrevious($variable, function (Node $subNode) use($variable) : bool { - if ($this->isParamRefrenced($subNode, $variable)) { + if ($this->isParamReferenced($subNode, $variable)) { return \true; } if (!$subNode instanceof Variable) { @@ -87,7 +87,7 @@ final class VariableAnalyzer $parentParentNode = $parentNode->getAttribute(AttributeKey::PARENT_NODE); return $parentParentNode instanceof Static_; } - private function isParamRefrenced(Node $node, Variable $variable) : bool + private function isParamReferenced(Node $node, Variable $variable) : bool { if (!$node instanceof Param) { return \false; diff --git a/vendor/autoload.php b/vendor/autoload.php index 251785a33ea..0d660476a5b 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -9,4 +9,4 @@ if (PHP_VERSION_ID < 50600) { require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit9000a7011eee3ea8a0a5c273025a2cde::getLoader(); +return ComposerAutoloaderInit9f78686f83a3f168d1e9e492a018c1b4::getLoader(); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index c9450873f99..39c2f9db54b 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit9000a7011eee3ea8a0a5c273025a2cde +class ComposerAutoloaderInit9f78686f83a3f168d1e9e492a018c1b4 { private static $loader; @@ -22,19 +22,19 @@ class ComposerAutoloaderInit9000a7011eee3ea8a0a5c273025a2cde return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit9000a7011eee3ea8a0a5c273025a2cde', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit9f78686f83a3f168d1e9e492a018c1b4', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); - spl_autoload_unregister(array('ComposerAutoloaderInit9000a7011eee3ea8a0a5c273025a2cde', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit9f78686f83a3f168d1e9e492a018c1b4', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit9000a7011eee3ea8a0a5c273025a2cde::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit9f78686f83a3f168d1e9e492a018c1b4::getInitializer($loader)); $loader->setClassMapAuthoritative(true); $loader->register(true); - $includeFiles = \Composer\Autoload\ComposerStaticInit9000a7011eee3ea8a0a5c273025a2cde::$files; + $includeFiles = \Composer\Autoload\ComposerStaticInit9f78686f83a3f168d1e9e492a018c1b4::$files; foreach ($includeFiles as $fileIdentifier => $file) { - composerRequire9000a7011eee3ea8a0a5c273025a2cde($fileIdentifier, $file); + composerRequire9f78686f83a3f168d1e9e492a018c1b4($fileIdentifier, $file); } return $loader; @@ -46,7 +46,7 @@ class ComposerAutoloaderInit9000a7011eee3ea8a0a5c273025a2cde * @param string $file * @return void */ -function composerRequire9000a7011eee3ea8a0a5c273025a2cde($fileIdentifier, $file) +function composerRequire9f78686f83a3f168d1e9e492a018c1b4($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index e936bdbe74c..31aa63edf99 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit9000a7011eee3ea8a0a5c273025a2cde +class ComposerStaticInit9f78686f83a3f168d1e9e492a018c1b4 { public static $files = array ( '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', @@ -3419,9 +3419,9 @@ class ComposerStaticInit9000a7011eee3ea8a0a5c273025a2cde public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit9000a7011eee3ea8a0a5c273025a2cde::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit9000a7011eee3ea8a0a5c273025a2cde::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit9000a7011eee3ea8a0a5c273025a2cde::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInit9f78686f83a3f168d1e9e492a018c1b4::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit9f78686f83a3f168d1e9e492a018c1b4::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit9f78686f83a3f168d1e9e492a018c1b4::$classMap; }, null, ClassLoader::class); }