Updated Rector to commit 77a4582d5044446b8da43ab91a09082fa0413a23

77a4582d50 [Core] Clean up NodeFactory::createSelfFetchConstant(), remove unused  parameter (#1898)
This commit is contained in:
Tomas Votruba 2022-03-03 11:38:10 +00:00
parent 6e53e4e59c
commit 6be685bf77
9 changed files with 23 additions and 23 deletions

View File

@ -52,7 +52,7 @@ CODE_SAMPLE
*/ */
public function refactor(\PhpParser\Node $node) : \PhpParser\Node\Expr\ClassConstFetch public function refactor(\PhpParser\Node $node) : \PhpParser\Node\Expr\ClassConstFetch
{ {
return $this->nodeFactory->createSelfFetchConstant('class', $node); return $this->nodeFactory->createSelfFetchConstant('class');
} }
public function provideMinPhpVersion() : int public function provideMinPhpVersion() : int
{ {

View File

@ -63,7 +63,7 @@ final class PropertyFetchWithConstFetchReplacer
return null; return null;
} }
// replace with constant fetch // replace with constant fetch
return $this->nodeFactory->createSelfFetchConstant($constantName, $node); return $this->nodeFactory->createSelfFetchConstant($constantName);
}); });
} }
} }

View File

@ -168,7 +168,7 @@ CODE_SAMPLE
if ($this->isClassConstExistsWithDifferentValue($classConsts, $constantName, $node->value)) { if ($this->isClassConstExistsWithDifferentValue($classConsts, $constantName, $node->value)) {
return null; return null;
} }
return $this->nodeFactory->createSelfFetchConstant($constantName, $node); return $this->nodeFactory->createSelfFetchConstant($constantName);
}); });
} }
/** /**

View File

@ -16,11 +16,11 @@ final class VersionResolver
/** /**
* @var string * @var string
*/ */
public const PACKAGE_VERSION = '76bb6ecd4d999e70d8d7c8918d6b6a8dbf35c851'; public const PACKAGE_VERSION = '77a4582d5044446b8da43ab91a09082fa0413a23';
/** /**
* @var string * @var string
*/ */
public const RELEASE_DATE = '2022-03-03 09:31:20'; public const RELEASE_DATE = '2022-03-03 11:31:45';
public static function resolvePackageVersion() : string public static function resolvePackageVersion() : string
{ {
$process = new \RectorPrefix20220303\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__); $process = new \RectorPrefix20220303\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__);

View File

@ -392,7 +392,7 @@ final class NodeFactory
$arguments = $this->createArgs($arguments); $arguments = $this->createArgs($arguments);
return new \PhpParser\Node\Expr\FuncCall(new \PhpParser\Node\Name($name), $arguments); return new \PhpParser\Node\Expr\FuncCall(new \PhpParser\Node\Name($name), $arguments);
} }
public function createSelfFetchConstant(string $constantName, \PhpParser\Node $node) : \PhpParser\Node\Expr\ClassConstFetch public function createSelfFetchConstant(string $constantName) : \PhpParser\Node\Expr\ClassConstFetch
{ {
$name = new \PhpParser\Node\Name(\Rector\Core\Enum\ObjectReference::SELF()->getValue()); $name = new \PhpParser\Node\Name(\Rector\Core\Enum\ObjectReference::SELF()->getValue());
return new \PhpParser\Node\Expr\ClassConstFetch($name, $constantName); return new \PhpParser\Node\Expr\ClassConstFetch($name, $constantName);

2
vendor/autoload.php vendored
View File

@ -4,4 +4,4 @@
require_once __DIR__ . '/composer/autoload_real.php'; require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInitccd99b2f8661e9a7ada72d9452ddae19::getLoader(); return ComposerAutoloaderInitc2735cf1989bce4d90aae3482b0d0dbd::getLoader();

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer // autoload_real.php @generated by Composer
class ComposerAutoloaderInitccd99b2f8661e9a7ada72d9452ddae19 class ComposerAutoloaderInitc2735cf1989bce4d90aae3482b0d0dbd
{ {
private static $loader; private static $loader;
@ -22,15 +22,15 @@ class ComposerAutoloaderInitccd99b2f8661e9a7ada72d9452ddae19
return self::$loader; return self::$loader;
} }
spl_autoload_register(array('ComposerAutoloaderInitccd99b2f8661e9a7ada72d9452ddae19', 'loadClassLoader'), true, true); spl_autoload_register(array('ComposerAutoloaderInitc2735cf1989bce4d90aae3482b0d0dbd', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInitccd99b2f8661e9a7ada72d9452ddae19', 'loadClassLoader')); spl_autoload_unregister(array('ComposerAutoloaderInitc2735cf1989bce4d90aae3482b0d0dbd', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) { if ($useStaticLoader) {
require __DIR__ . '/autoload_static.php'; require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitccd99b2f8661e9a7ada72d9452ddae19::getInitializer($loader)); call_user_func(\Composer\Autoload\ComposerStaticInitc2735cf1989bce4d90aae3482b0d0dbd::getInitializer($loader));
} else { } else {
$classMap = require __DIR__ . '/autoload_classmap.php'; $classMap = require __DIR__ . '/autoload_classmap.php';
if ($classMap) { if ($classMap) {
@ -42,12 +42,12 @@ class ComposerAutoloaderInitccd99b2f8661e9a7ada72d9452ddae19
$loader->register(true); $loader->register(true);
if ($useStaticLoader) { if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInitccd99b2f8661e9a7ada72d9452ddae19::$files; $includeFiles = Composer\Autoload\ComposerStaticInitc2735cf1989bce4d90aae3482b0d0dbd::$files;
} else { } else {
$includeFiles = require __DIR__ . '/autoload_files.php'; $includeFiles = require __DIR__ . '/autoload_files.php';
} }
foreach ($includeFiles as $fileIdentifier => $file) { foreach ($includeFiles as $fileIdentifier => $file) {
composerRequireccd99b2f8661e9a7ada72d9452ddae19($fileIdentifier, $file); composerRequirec2735cf1989bce4d90aae3482b0d0dbd($fileIdentifier, $file);
} }
return $loader; return $loader;
@ -59,7 +59,7 @@ class ComposerAutoloaderInitccd99b2f8661e9a7ada72d9452ddae19
* @param string $file * @param string $file
* @return void * @return void
*/ */
function composerRequireccd99b2f8661e9a7ada72d9452ddae19($fileIdentifier, $file) function composerRequirec2735cf1989bce4d90aae3482b0d0dbd($fileIdentifier, $file)
{ {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload; namespace Composer\Autoload;
class ComposerStaticInitccd99b2f8661e9a7ada72d9452ddae19 class ComposerStaticInitc2735cf1989bce4d90aae3482b0d0dbd
{ {
public static $files = array ( public static $files = array (
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php', '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
@ -3848,9 +3848,9 @@ class ComposerStaticInitccd99b2f8661e9a7ada72d9452ddae19
public static function getInitializer(ClassLoader $loader) public static function getInitializer(ClassLoader $loader)
{ {
return \Closure::bind(function () use ($loader) { return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitccd99b2f8661e9a7ada72d9452ddae19::$prefixLengthsPsr4; $loader->prefixLengthsPsr4 = ComposerStaticInitc2735cf1989bce4d90aae3482b0d0dbd::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitccd99b2f8661e9a7ada72d9452ddae19::$prefixDirsPsr4; $loader->prefixDirsPsr4 = ComposerStaticInitc2735cf1989bce4d90aae3482b0d0dbd::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitccd99b2f8661e9a7ada72d9452ddae19::$classMap; $loader->classMap = ComposerStaticInitc2735cf1989bce4d90aae3482b0d0dbd::$classMap;
}, null, ClassLoader::class); }, null, ClassLoader::class);
} }

View File

@ -9,8 +9,8 @@ $loader = require_once __DIR__.'/autoload.php';
if (!class_exists('AutoloadIncluder', false) && !interface_exists('AutoloadIncluder', false) && !trait_exists('AutoloadIncluder', false)) { if (!class_exists('AutoloadIncluder', false) && !interface_exists('AutoloadIncluder', false) && !trait_exists('AutoloadIncluder', false)) {
spl_autoload_call('RectorPrefix20220303\AutoloadIncluder'); spl_autoload_call('RectorPrefix20220303\AutoloadIncluder');
} }
if (!class_exists('ComposerAutoloaderInitccd99b2f8661e9a7ada72d9452ddae19', false) && !interface_exists('ComposerAutoloaderInitccd99b2f8661e9a7ada72d9452ddae19', false) && !trait_exists('ComposerAutoloaderInitccd99b2f8661e9a7ada72d9452ddae19', false)) { if (!class_exists('ComposerAutoloaderInitc2735cf1989bce4d90aae3482b0d0dbd', false) && !interface_exists('ComposerAutoloaderInitc2735cf1989bce4d90aae3482b0d0dbd', false) && !trait_exists('ComposerAutoloaderInitc2735cf1989bce4d90aae3482b0d0dbd', false)) {
spl_autoload_call('RectorPrefix20220303\ComposerAutoloaderInitccd99b2f8661e9a7ada72d9452ddae19'); spl_autoload_call('RectorPrefix20220303\ComposerAutoloaderInitc2735cf1989bce4d90aae3482b0d0dbd');
} }
if (!class_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !interface_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !trait_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false)) { if (!class_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !interface_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !trait_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false)) {
spl_autoload_call('RectorPrefix20220303\Helmich\TypoScriptParser\Parser\AST\Statement'); spl_autoload_call('RectorPrefix20220303\Helmich\TypoScriptParser\Parser\AST\Statement');
@ -59,9 +59,9 @@ if (!function_exists('print_node')) {
return \RectorPrefix20220303\print_node(...func_get_args()); return \RectorPrefix20220303\print_node(...func_get_args());
} }
} }
if (!function_exists('composerRequireccd99b2f8661e9a7ada72d9452ddae19')) { if (!function_exists('composerRequirec2735cf1989bce4d90aae3482b0d0dbd')) {
function composerRequireccd99b2f8661e9a7ada72d9452ddae19() { function composerRequirec2735cf1989bce4d90aae3482b0d0dbd() {
return \RectorPrefix20220303\composerRequireccd99b2f8661e9a7ada72d9452ddae19(...func_get_args()); return \RectorPrefix20220303\composerRequirec2735cf1989bce4d90aae3482b0d0dbd(...func_get_args());
} }
} }
if (!function_exists('scanPath')) { if (!function_exists('scanPath')) {