Updated Rector to commit 5972ff7417911319f1ce754636937cd07af2a04c

5972ff7417 [EarlyReturn] Mirror comment on ReturnEarlyIfVariableRector (#2612)
This commit is contained in:
Tomas Votruba 2022-07-03 07:04:34 +00:00
parent a4cb18fa00
commit 3737ef475a
6 changed files with 17 additions and 16 deletions

View File

@ -90,6 +90,7 @@ CODE_SAMPLE
continue; continue;
} }
$if->stmts[0] = new Return_($assignedExpr); $if->stmts[0] = new Return_($assignedExpr);
$this->mirrorComments($if->stmts[0], $onlyIfStmt);
return $node; return $node;
} }
} }

View File

@ -17,12 +17,12 @@ final class VersionResolver
* @api * @api
* @var string * @var string
*/ */
public const PACKAGE_VERSION = '153c037739a0154195b52d74217d5b025b3936ac'; public const PACKAGE_VERSION = '5972ff7417911319f1ce754636937cd07af2a04c';
/** /**
* @api * @api
* @var string * @var string
*/ */
public const RELEASE_DATE = '2022-07-03 00:30:40'; public const RELEASE_DATE = '2022-07-03 08:59:25';
/** /**
* @var int * @var int
*/ */

View File

@ -56,7 +56,7 @@ final class VariableAnalyzer
public function isUsedByReference(Variable $variable) : bool public function isUsedByReference(Variable $variable) : bool
{ {
return (bool) $this->betterNodeFinder->findFirstPrevious($variable, function (Node $subNode) use($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; return \true;
} }
if (!$subNode instanceof Variable) { if (!$subNode instanceof Variable) {
@ -87,7 +87,7 @@ final class VariableAnalyzer
$parentParentNode = $parentNode->getAttribute(AttributeKey::PARENT_NODE); $parentParentNode = $parentNode->getAttribute(AttributeKey::PARENT_NODE);
return $parentParentNode instanceof Static_; return $parentParentNode instanceof Static_;
} }
private function isParamRefrenced(Node $node, Variable $variable) : bool private function isParamReferenced(Node $node, Variable $variable) : bool
{ {
if (!$node instanceof Param) { if (!$node instanceof Param) {
return \false; return \false;

2
vendor/autoload.php vendored
View File

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

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer // autoload_real.php @generated by Composer
class ComposerAutoloaderInit9000a7011eee3ea8a0a5c273025a2cde class ComposerAutoloaderInit9f78686f83a3f168d1e9e492a018c1b4
{ {
private static $loader; private static $loader;
@ -22,19 +22,19 @@ class ComposerAutoloaderInit9000a7011eee3ea8a0a5c273025a2cde
return self::$loader; 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__)); 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'; 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->setClassMapAuthoritative(true);
$loader->register(true); $loader->register(true);
$includeFiles = \Composer\Autoload\ComposerStaticInit9000a7011eee3ea8a0a5c273025a2cde::$files; $includeFiles = \Composer\Autoload\ComposerStaticInit9f78686f83a3f168d1e9e492a018c1b4::$files;
foreach ($includeFiles as $fileIdentifier => $file) { foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire9000a7011eee3ea8a0a5c273025a2cde($fileIdentifier, $file); composerRequire9f78686f83a3f168d1e9e492a018c1b4($fileIdentifier, $file);
} }
return $loader; return $loader;
@ -46,7 +46,7 @@ class ComposerAutoloaderInit9000a7011eee3ea8a0a5c273025a2cde
* @param string $file * @param string $file
* @return void * @return void
*/ */
function composerRequire9000a7011eee3ea8a0a5c273025a2cde($fileIdentifier, $file) function composerRequire9f78686f83a3f168d1e9e492a018c1b4($fileIdentifier, $file)
{ {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

View File

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