mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-19 06:18:07 +01:00
Updated Rector to commit c8e7963c048c61053f98c2aaa5690891cecc884e
c8e7963c04
[CodeQuality][Performance] Using STOP_TRAVERSAL in traverseNodesWithCallable() in LocallyCalledStaticMethodToNonStaticRector (#4278)
This commit is contained in:
parent
07222965c2
commit
09e844dec2
@ -9,6 +9,7 @@ use PhpParser\Node\Expr\StaticCall;
|
||||
use PhpParser\Node\Expr\Variable;
|
||||
use PhpParser\Node\Stmt\Class_;
|
||||
use PhpParser\Node\Stmt\ClassMethod;
|
||||
use PhpParser\NodeTraverser;
|
||||
use PHPStan\Reflection\ClassReflection;
|
||||
use Rector\Core\Rector\AbstractRector;
|
||||
use Rector\Core\Reflection\ReflectionResolver;
|
||||
@ -146,7 +147,7 @@ CODE_SAMPLE
|
||||
if (!$checkedClassMethod->isStatic()) {
|
||||
continue;
|
||||
}
|
||||
$this->traverseNodesWithCallable($checkedClassMethod, function (Node $node) use($currentClassMethodName, &$isInsideStaticClassMethod) : ?StaticCall {
|
||||
$this->traverseNodesWithCallable($checkedClassMethod, function (Node $node) use($currentClassMethodName, &$isInsideStaticClassMethod) : ?int {
|
||||
if (!$node instanceof StaticCall) {
|
||||
return null;
|
||||
}
|
||||
@ -157,7 +158,7 @@ CODE_SAMPLE
|
||||
return null;
|
||||
}
|
||||
$isInsideStaticClassMethod = \true;
|
||||
return $node;
|
||||
return NodeTraverser::STOP_TRAVERSAL;
|
||||
});
|
||||
if ($isInsideStaticClassMethod) {
|
||||
return $isInsideStaticClassMethod;
|
||||
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '33cfa4f7164c7b0d2c2922d4cd9f0ebdac43a5d9';
|
||||
public const PACKAGE_VERSION = 'c8e7963c048c61053f98c2aaa5690891cecc884e';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2023-06-18 20:42:41';
|
||||
public const RELEASE_DATE = '2023-06-18 14:00:17';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
|
||||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInitc256e5c59d78d03070c2c1433d8b6a30::getLoader();
|
||||
return ComposerAutoloaderInitf6a111c9029b0e34cc1fc0802a8670be::getLoader();
|
||||
|
10
vendor/composer/autoload_real.php
vendored
10
vendor/composer/autoload_real.php
vendored
@ -2,7 +2,7 @@
|
||||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInitc256e5c59d78d03070c2c1433d8b6a30
|
||||
class ComposerAutoloaderInitf6a111c9029b0e34cc1fc0802a8670be
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,17 +22,17 @@ class ComposerAutoloaderInitc256e5c59d78d03070c2c1433d8b6a30
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInitc256e5c59d78d03070c2c1433d8b6a30', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInitf6a111c9029b0e34cc1fc0802a8670be', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitc256e5c59d78d03070c2c1433d8b6a30', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitf6a111c9029b0e34cc1fc0802a8670be', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitc256e5c59d78d03070c2c1433d8b6a30::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitf6a111c9029b0e34cc1fc0802a8670be::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInitc256e5c59d78d03070c2c1433d8b6a30::$files;
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInitf6a111c9029b0e34cc1fc0802a8670be::$files;
|
||||
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
||||
|
8
vendor/composer/autoload_static.php
vendored
8
vendor/composer/autoload_static.php
vendored
@ -4,7 +4,7 @@
|
||||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInitc256e5c59d78d03070c2c1433d8b6a30
|
||||
class ComposerStaticInitf6a111c9029b0e34cc1fc0802a8670be
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
@ -3095,9 +3095,9 @@ class ComposerStaticInitc256e5c59d78d03070c2c1433d8b6a30
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitc256e5c59d78d03070c2c1433d8b6a30::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitc256e5c59d78d03070c2c1433d8b6a30::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitc256e5c59d78d03070c2c1433d8b6a30::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitf6a111c9029b0e34cc1fc0802a8670be::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitf6a111c9029b0e34cc1fc0802a8670be::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitf6a111c9029b0e34cc1fc0802a8670be::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user