From a40539cb31edd0810d7d261a8538e87457828906 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Thu, 20 Jul 2023 21:10:17 +0000 Subject: [PATCH] Updated Rector to commit f403ca026144fc810918f6eb6178ea88f16c0641 /~https://github.com/rectorphp/rector-src/commit/f403ca026144fc810918f6eb6178ea88f16c0641 [Performance] [PostRector] Only check phpdocinfo on Stmt and Param on NameImportingPostRector (#4558) --- packages/PostRector/Rector/NameImportingPostRector.php | 6 ++++-- src/Application/VersionResolver.php | 4 ++-- vendor/autoload.php | 2 +- vendor/composer/autoload_real.php | 10 +++++----- vendor/composer/autoload_static.php | 8 ++++---- 5 files changed, 16 insertions(+), 14 deletions(-) diff --git a/packages/PostRector/Rector/NameImportingPostRector.php b/packages/PostRector/Rector/NameImportingPostRector.php index 6908f4afd688..3d5a14e59900 100644 --- a/packages/PostRector/Rector/NameImportingPostRector.php +++ b/packages/PostRector/Rector/NameImportingPostRector.php @@ -3,6 +3,7 @@ declare (strict_types=1); namespace Rector\PostRector\Rector; +use PhpParser\Node\Param; use PhpParser\Node; use PhpParser\Node\Identifier; use PhpParser\Node\Name; @@ -96,11 +97,12 @@ public function enterNode(Node $node) : ?Node if ($node instanceof Name) { return $this->processNodeName($node, $file); } - if (SimpleParameterProvider::provideBoolParameter(Option::AUTO_IMPORT_DOC_BLOCK_NAMES)) { + if (($node instanceof Stmt || $node instanceof Param) && SimpleParameterProvider::provideBoolParameter(Option::AUTO_IMPORT_DOC_BLOCK_NAMES)) { $phpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($node); $this->docBlockNameImporter->importNames($phpDocInfo->getPhpDocNode(), $node); + return $node; } - return $node; + return null; } public function getRuleDefinition() : RuleDefinition { diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 76fc114d6b87..de436377ee70 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -19,12 +19,12 @@ final class VersionResolver * @api * @var string */ - public const PACKAGE_VERSION = 'e90812c07277304a4b57b62058f6d61ce9a11833'; + public const PACKAGE_VERSION = 'f403ca026144fc810918f6eb6178ea88f16c0641'; /** * @api * @var string */ - public const RELEASE_DATE = '2023-07-20 21:11:13'; + public const RELEASE_DATE = '2023-07-21 04:05:33'; /** * @var int */ diff --git a/vendor/autoload.php b/vendor/autoload.php index e77f8b079c43..b09f245487b4 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -22,4 +22,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit29762075c4c169116a99dd54a4e4ecda::getLoader(); +return ComposerAutoloaderInitcecd0c80d627eae86703ca38e6153385::getLoader(); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 43aa52360f7d..622caea167a5 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit29762075c4c169116a99dd54a4e4ecda +class ComposerAutoloaderInitcecd0c80d627eae86703ca38e6153385 { private static $loader; @@ -22,17 +22,17 @@ public static function getLoader() return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit29762075c4c169116a99dd54a4e4ecda', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInitcecd0c80d627eae86703ca38e6153385', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); - spl_autoload_unregister(array('ComposerAutoloaderInit29762075c4c169116a99dd54a4e4ecda', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInitcecd0c80d627eae86703ca38e6153385', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit29762075c4c169116a99dd54a4e4ecda::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInitcecd0c80d627eae86703ca38e6153385::getInitializer($loader)); $loader->setClassMapAuthoritative(true); $loader->register(true); - $filesToLoad = \Composer\Autoload\ComposerStaticInit29762075c4c169116a99dd54a4e4ecda::$files; + $filesToLoad = \Composer\Autoload\ComposerStaticInitcecd0c80d627eae86703ca38e6153385::$files; $requireFile = \Closure::bind(static function ($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 7879dd967f4b..4c6361d0daca 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit29762075c4c169116a99dd54a4e4ecda +class ComposerStaticInitcecd0c80d627eae86703ca38e6153385 { public static $files = array ( 'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php', @@ -3023,9 +3023,9 @@ class ComposerStaticInit29762075c4c169116a99dd54a4e4ecda public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit29762075c4c169116a99dd54a4e4ecda::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit29762075c4c169116a99dd54a4e4ecda::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit29762075c4c169116a99dd54a4e4ecda::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInitcecd0c80d627eae86703ca38e6153385::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInitcecd0c80d627eae86703ca38e6153385::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInitcecd0c80d627eae86703ca38e6153385::$classMap; }, null, ClassLoader::class); }