Skip to content

Commit

Permalink
Updated Rector to commit 9be0ac335782f52be36535eb29f30df87bee42c2
Browse files Browse the repository at this point in the history
rectorphp/rector-src@9be0ac3 [Performance] No need to traverseNodesWithCallable() when only single node types on decorateCurrentAndChildren (#4870)
  • Loading branch information
TomasVotruba committed Aug 28, 2023
1 parent edd0b48 commit 025bdb2
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/Application/VersionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '684a317c5116bf60d43080ad62af7ae73c221894';
public const PACKAGE_VERSION = '9be0ac335782f52be36535eb29f30df87bee42c2';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-08-28 12:26:14';
public const RELEASE_DATE = '2023-08-28 12:32:26';
/**
* @var int
*/
Expand Down
9 changes: 6 additions & 3 deletions src/Rector/AbstractRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,14 @@ private function decorateCurrentAndChildren(Node $node) : void
// 1. registered in getNodesTypes() method
// 2. different with current node type, as already decorated above
//
$types = \array_filter($this->getNodeTypes(), static function (string $nodeType) use($node) : bool {
$otherTypes = \array_filter($this->getNodeTypes(), static function (string $nodeType) use($node) : bool {
return $nodeType !== \get_class($node);
});
$this->traverseNodesWithCallable($node, static function (Node $subNode) use($types) {
if (\in_array(\get_class($subNode), $types, \true)) {
if ($otherTypes === []) {
return;
}
$this->traverseNodesWithCallable($node, static function (Node $subNode) use($otherTypes) {
if (\in_array(\get_class($subNode), $otherTypes, \true)) {
$subNode->setAttribute(AttributeKey::SKIPPED_BY_RECTOR_RULE, static::class);
$subNode->setAttribute(AttributeKey::SKIPPED_BY_RECTOR_RULE, static::class);
}
Expand Down
2 changes: 1 addition & 1 deletion vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@

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

return ComposerAutoloaderInit6504f4b1285986c318f9a2848b666cca::getLoader();
return ComposerAutoloaderInita85843a8d20740b167645a18153047f0::getLoader();
10 changes: 5 additions & 5 deletions vendor/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// autoload_real.php @generated by Composer

class ComposerAutoloaderInit6504f4b1285986c318f9a2848b666cca
class ComposerAutoloaderInita85843a8d20740b167645a18153047f0
{
private static $loader;

Expand All @@ -22,17 +22,17 @@ public static function getLoader()
return self::$loader;
}

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

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

$loader->setClassMapAuthoritative(true);
$loader->register(true);

$filesToLoad = \Composer\Autoload\ComposerStaticInit6504f4b1285986c318f9a2848b666cca::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInita85843a8d20740b167645a18153047f0::$files;
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
Expand Down
8 changes: 4 additions & 4 deletions vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Composer\Autoload;

class ComposerStaticInit6504f4b1285986c318f9a2848b666cca
class ComposerStaticInita85843a8d20740b167645a18153047f0
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
Expand Down Expand Up @@ -2608,9 +2608,9 @@ class ComposerStaticInit6504f4b1285986c318f9a2848b666cca
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit6504f4b1285986c318f9a2848b666cca::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit6504f4b1285986c318f9a2848b666cca::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit6504f4b1285986c318f9a2848b666cca::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInita85843a8d20740b167645a18153047f0::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInita85843a8d20740b167645a18153047f0::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInita85843a8d20740b167645a18153047f0::$classMap;

}, null, ClassLoader::class);
}
Expand Down

0 comments on commit 025bdb2

Please sign in to comment.