mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-31 12:42:05 +01:00
Updated Rector to commit 2bb26e36611fdee67ead9fac0b7cc18ead0d923b
2bb26e3661
[PostRector] Improve performance NameImportingPostRector (#3708)
This commit is contained in:
parent
b2bc547d46
commit
bd3ec63267
@ -18,6 +18,7 @@ use Rector\CodingStyle\ClassNameImport\ClassNameImportSkipper;
|
||||
use Rector\CodingStyle\Node\NameImporter;
|
||||
use Rector\Core\Configuration\Option;
|
||||
use Rector\Core\Configuration\Parameter\ParameterProvider;
|
||||
use Rector\Core\PhpParser\Node\CustomNode\FileWithoutNamespace;
|
||||
use Rector\Core\Provider\CurrentFileProvider;
|
||||
use Rector\Core\ValueObject\Application\File;
|
||||
use Rector\Naming\Naming\AliasNameResolver;
|
||||
@ -94,12 +95,8 @@ final class NameImportingPostRector extends \Rector\PostRector\Rector\AbstractPo
|
||||
if (!$file instanceof File) {
|
||||
return null;
|
||||
}
|
||||
$currentStmt = \current($file->getOldStmts());
|
||||
if ($currentStmt instanceof InlineHTML) {
|
||||
return null;
|
||||
}
|
||||
$currentStmt = \current($file->getNewStmts());
|
||||
if ($currentStmt instanceof InlineHTML) {
|
||||
if ($currentStmt instanceof FileWithoutNamespace && \current($currentStmt->stmts) instanceof InlineHTML) {
|
||||
return null;
|
||||
}
|
||||
if ($node instanceof Name) {
|
||||
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '0451834fd58ba9a7fddde47f47a60c4911388738';
|
||||
public const PACKAGE_VERSION = '2bb26e36611fdee67ead9fac0b7cc18ead0d923b';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2023-04-29 14:16:19';
|
||||
public const RELEASE_DATE = '2023-04-29 21:07:16';
|
||||
/**
|
||||
* @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 ComposerAutoloaderInit2773ddeac408db9ec6f4eb34a1d2ce3f::getLoader();
|
||||
return ComposerAutoloaderInitd0761e6fc65102b7b75339783ec30fb1::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 ComposerAutoloaderInit2773ddeac408db9ec6f4eb34a1d2ce3f
|
||||
class ComposerAutoloaderInitd0761e6fc65102b7b75339783ec30fb1
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,17 +22,17 @@ class ComposerAutoloaderInit2773ddeac408db9ec6f4eb34a1d2ce3f
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit2773ddeac408db9ec6f4eb34a1d2ce3f', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInitd0761e6fc65102b7b75339783ec30fb1', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit2773ddeac408db9ec6f4eb34a1d2ce3f', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitd0761e6fc65102b7b75339783ec30fb1', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit2773ddeac408db9ec6f4eb34a1d2ce3f::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitd0761e6fc65102b7b75339783ec30fb1::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit2773ddeac408db9ec6f4eb34a1d2ce3f::$files;
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInitd0761e6fc65102b7b75339783ec30fb1::$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 ComposerStaticInit2773ddeac408db9ec6f4eb34a1d2ce3f
|
||||
class ComposerStaticInitd0761e6fc65102b7b75339783ec30fb1
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
@ -3152,9 +3152,9 @@ class ComposerStaticInit2773ddeac408db9ec6f4eb34a1d2ce3f
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit2773ddeac408db9ec6f4eb34a1d2ce3f::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit2773ddeac408db9ec6f4eb34a1d2ce3f::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit2773ddeac408db9ec6f4eb34a1d2ce3f::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitd0761e6fc65102b7b75339783ec30fb1::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitd0761e6fc65102b7b75339783ec30fb1::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitd0761e6fc65102b7b75339783ec30fb1::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user