Skip to content

Commit 025bdb2

Browse files
committed
Updated Rector to commit 9be0ac335782f52be36535eb29f30df87bee42c2
rectorphp/rector-src@9be0ac3 [Performance] No need to traverseNodesWithCallable() when only single node types on decorateCurrentAndChildren (#4870)
1 parent edd0b48 commit 025bdb2

5 files changed

Lines changed: 18 additions & 15 deletions

File tree

src/Application/VersionResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ final class VersionResolver
1919
* @api
2020
* @var string
2121
*/
22-
public const PACKAGE_VERSION = '684a317c5116bf60d43080ad62af7ae73c221894';
22+
public const PACKAGE_VERSION = '9be0ac335782f52be36535eb29f30df87bee42c2';
2323
/**
2424
* @api
2525
* @var string
2626
*/
27-
public const RELEASE_DATE = '2023-08-28 12:26:14';
27+
public const RELEASE_DATE = '2023-08-28 12:32:26';
2828
/**
2929
* @var int
3030
*/

src/Rector/AbstractRector.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,14 @@ private function decorateCurrentAndChildren(Node $node) : void
220220
// 1. registered in getNodesTypes() method
221221
// 2. different with current node type, as already decorated above
222222
//
223-
$types = \array_filter($this->getNodeTypes(), static function (string $nodeType) use($node) : bool {
223+
$otherTypes = \array_filter($this->getNodeTypes(), static function (string $nodeType) use($node) : bool {
224224
return $nodeType !== \get_class($node);
225225
});
226-
$this->traverseNodesWithCallable($node, static function (Node $subNode) use($types) {
227-
if (\in_array(\get_class($subNode), $types, \true)) {
226+
if ($otherTypes === []) {
227+
return;
228+
}
229+
$this->traverseNodesWithCallable($node, static function (Node $subNode) use($otherTypes) {
230+
if (\in_array(\get_class($subNode), $otherTypes, \true)) {
228231
$subNode->setAttribute(AttributeKey::SKIPPED_BY_RECTOR_RULE, static::class);
229232
$subNode->setAttribute(AttributeKey::SKIPPED_BY_RECTOR_RULE, static::class);
230233
}

vendor/autoload.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@
2222

2323
require_once __DIR__ . '/composer/autoload_real.php';
2424

25-
return ComposerAutoloaderInit6504f4b1285986c318f9a2848b666cca::getLoader();
25+
return ComposerAutoloaderInita85843a8d20740b167645a18153047f0::getLoader();

vendor/composer/autoload_real.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
// autoload_real.php @generated by Composer
44

5-
class ComposerAutoloaderInit6504f4b1285986c318f9a2848b666cca
5+
class ComposerAutoloaderInita85843a8d20740b167645a18153047f0
66
{
77
private static $loader;
88

@@ -22,17 +22,17 @@ public static function getLoader()
2222
return self::$loader;
2323
}
2424

25-
spl_autoload_register(array('ComposerAutoloaderInit6504f4b1285986c318f9a2848b666cca', 'loadClassLoader'), true, true);
25+
spl_autoload_register(array('ComposerAutoloaderInita85843a8d20740b167645a18153047f0', 'loadClassLoader'), true, true);
2626
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
27-
spl_autoload_unregister(array('ComposerAutoloaderInit6504f4b1285986c318f9a2848b666cca', 'loadClassLoader'));
27+
spl_autoload_unregister(array('ComposerAutoloaderInita85843a8d20740b167645a18153047f0', 'loadClassLoader'));
2828

2929
require __DIR__ . '/autoload_static.php';
30-
call_user_func(\Composer\Autoload\ComposerStaticInit6504f4b1285986c318f9a2848b666cca::getInitializer($loader));
30+
call_user_func(\Composer\Autoload\ComposerStaticInita85843a8d20740b167645a18153047f0::getInitializer($loader));
3131

3232
$loader->setClassMapAuthoritative(true);
3333
$loader->register(true);
3434

35-
$filesToLoad = \Composer\Autoload\ComposerStaticInit6504f4b1285986c318f9a2848b666cca::$files;
35+
$filesToLoad = \Composer\Autoload\ComposerStaticInita85843a8d20740b167645a18153047f0::$files;
3636
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
3737
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
3838
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

vendor/composer/autoload_static.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace Composer\Autoload;
66

7-
class ComposerStaticInit6504f4b1285986c318f9a2848b666cca
7+
class ComposerStaticInita85843a8d20740b167645a18153047f0
88
{
99
public static $files = array (
1010
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
@@ -2608,9 +2608,9 @@ class ComposerStaticInit6504f4b1285986c318f9a2848b666cca
26082608
public static function getInitializer(ClassLoader $loader)
26092609
{
26102610
return \Closure::bind(function () use ($loader) {
2611-
$loader->prefixLengthsPsr4 = ComposerStaticInit6504f4b1285986c318f9a2848b666cca::$prefixLengthsPsr4;
2612-
$loader->prefixDirsPsr4 = ComposerStaticInit6504f4b1285986c318f9a2848b666cca::$prefixDirsPsr4;
2613-
$loader->classMap = ComposerStaticInit6504f4b1285986c318f9a2848b666cca::$classMap;
2611+
$loader->prefixLengthsPsr4 = ComposerStaticInita85843a8d20740b167645a18153047f0::$prefixLengthsPsr4;
2612+
$loader->prefixDirsPsr4 = ComposerStaticInita85843a8d20740b167645a18153047f0::$prefixDirsPsr4;
2613+
$loader->classMap = ComposerStaticInita85843a8d20740b167645a18153047f0::$classMap;
26142614

26152615
}, null, ClassLoader::class);
26162616
}

0 commit comments

Comments
 (0)