mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-17 21:38:22 +01:00
Updated Rector to commit c6a5b762dea6a71041b413554baa26f4b2400a11
c6a5b762de
StringClassNameToClassConstantRector: cheap checks first (#4151)
This commit is contained in:
parent
276b450e8a
commit
0222a6ac50
@ -126,9 +126,6 @@ CODE_SAMPLE
|
||||
}
|
||||
private function shouldSkip(string $classLikeName) : bool
|
||||
{
|
||||
if (!$this->reflectionProvider->hasClass($classLikeName)) {
|
||||
return \true;
|
||||
}
|
||||
// skip short class names, mostly invalid use of strings
|
||||
if (\strpos($classLikeName, '\\') === \false) {
|
||||
return \true;
|
||||
@ -137,6 +134,9 @@ CODE_SAMPLE
|
||||
if (\ctype_lower($classLikeName[0])) {
|
||||
return \true;
|
||||
}
|
||||
if (!$this->reflectionProvider->hasClass($classLikeName)) {
|
||||
return \true;
|
||||
}
|
||||
foreach ($this->classesToSkip as $classToSkip) {
|
||||
if ($this->nodeNameResolver->isStringName($classLikeName, $classToSkip)) {
|
||||
return \true;
|
||||
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = 'bc61ac2b0a95c93a557ccfe4f371f361ec09ab2c';
|
||||
public const PACKAGE_VERSION = 'c6a5b762dea6a71041b413554baa26f4b2400a11';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2023-06-10 06:29:57';
|
||||
public const RELEASE_DATE = '2023-06-10 07:52:38';
|
||||
/**
|
||||
* @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 ComposerAutoloaderInit4f4ac2e25f38d6f7f362f62fcaafd8d9::getLoader();
|
||||
return ComposerAutoloaderInitcba6ec738ed83b7c2fa2b12d2e80cd72::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 ComposerAutoloaderInit4f4ac2e25f38d6f7f362f62fcaafd8d9
|
||||
class ComposerAutoloaderInitcba6ec738ed83b7c2fa2b12d2e80cd72
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,17 +22,17 @@ class ComposerAutoloaderInit4f4ac2e25f38d6f7f362f62fcaafd8d9
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit4f4ac2e25f38d6f7f362f62fcaafd8d9', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInitcba6ec738ed83b7c2fa2b12d2e80cd72', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit4f4ac2e25f38d6f7f362f62fcaafd8d9', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitcba6ec738ed83b7c2fa2b12d2e80cd72', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit4f4ac2e25f38d6f7f362f62fcaafd8d9::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitcba6ec738ed83b7c2fa2b12d2e80cd72::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit4f4ac2e25f38d6f7f362f62fcaafd8d9::$files;
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInitcba6ec738ed83b7c2fa2b12d2e80cd72::$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 ComposerStaticInit4f4ac2e25f38d6f7f362f62fcaafd8d9
|
||||
class ComposerStaticInitcba6ec738ed83b7c2fa2b12d2e80cd72
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
@ -3128,9 +3128,9 @@ class ComposerStaticInit4f4ac2e25f38d6f7f362f62fcaafd8d9
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit4f4ac2e25f38d6f7f362f62fcaafd8d9::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit4f4ac2e25f38d6f7f362f62fcaafd8d9::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit4f4ac2e25f38d6f7f362f62fcaafd8d9::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitcba6ec738ed83b7c2fa2b12d2e80cd72::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitcba6ec738ed83b7c2fa2b12d2e80cd72::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitcba6ec738ed83b7c2fa2b12d2e80cd72::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user