mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-18 05:48:21 +01:00
Updated Rector to commit 77a4582d5044446b8da43ab91a09082fa0413a23
77a4582d50
[Core] Clean up NodeFactory::createSelfFetchConstant(), remove unused parameter (#1898)
This commit is contained in:
parent
6e53e4e59c
commit
6be685bf77
@ -52,7 +52,7 @@ CODE_SAMPLE
|
||||
*/
|
||||
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
|
||||
{
|
||||
|
@ -63,7 +63,7 @@ final class PropertyFetchWithConstFetchReplacer
|
||||
return null;
|
||||
}
|
||||
// replace with constant fetch
|
||||
return $this->nodeFactory->createSelfFetchConstant($constantName, $node);
|
||||
return $this->nodeFactory->createSelfFetchConstant($constantName);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -168,7 +168,7 @@ CODE_SAMPLE
|
||||
if ($this->isClassConstExistsWithDifferentValue($classConsts, $constantName, $node->value)) {
|
||||
return null;
|
||||
}
|
||||
return $this->nodeFactory->createSelfFetchConstant($constantName, $node);
|
||||
return $this->nodeFactory->createSelfFetchConstant($constantName);
|
||||
});
|
||||
}
|
||||
/**
|
||||
|
@ -16,11 +16,11 @@ final class VersionResolver
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '76bb6ecd4d999e70d8d7c8918d6b6a8dbf35c851';
|
||||
public const PACKAGE_VERSION = '77a4582d5044446b8da43ab91a09082fa0413a23';
|
||||
/**
|
||||
* @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
|
||||
{
|
||||
$process = new \RectorPrefix20220303\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__);
|
||||
|
@ -392,7 +392,7 @@ final class NodeFactory
|
||||
$arguments = $this->createArgs($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());
|
||||
return new \PhpParser\Node\Expr\ClassConstFetch($name, $constantName);
|
||||
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
@ -4,4 +4,4 @@
|
||||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInitccd99b2f8661e9a7ada72d9452ddae19::getLoader();
|
||||
return ComposerAutoloaderInitc2735cf1989bce4d90aae3482b0d0dbd::getLoader();
|
||||
|
14
vendor/composer/autoload_real.php
vendored
14
vendor/composer/autoload_real.php
vendored
@ -2,7 +2,7 @@
|
||||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInitccd99b2f8661e9a7ada72d9452ddae19
|
||||
class ComposerAutoloaderInitc2735cf1989bce4d90aae3482b0d0dbd
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,15 +22,15 @@ class ComposerAutoloaderInitccd99b2f8661e9a7ada72d9452ddae19
|
||||
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__)));
|
||||
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());
|
||||
if ($useStaticLoader) {
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitccd99b2f8661e9a7ada72d9452ddae19::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitc2735cf1989bce4d90aae3482b0d0dbd::getInitializer($loader));
|
||||
} else {
|
||||
$classMap = require __DIR__ . '/autoload_classmap.php';
|
||||
if ($classMap) {
|
||||
@ -42,12 +42,12 @@ class ComposerAutoloaderInitccd99b2f8661e9a7ada72d9452ddae19
|
||||
$loader->register(true);
|
||||
|
||||
if ($useStaticLoader) {
|
||||
$includeFiles = Composer\Autoload\ComposerStaticInitccd99b2f8661e9a7ada72d9452ddae19::$files;
|
||||
$includeFiles = Composer\Autoload\ComposerStaticInitc2735cf1989bce4d90aae3482b0d0dbd::$files;
|
||||
} else {
|
||||
$includeFiles = require __DIR__ . '/autoload_files.php';
|
||||
}
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequireccd99b2f8661e9a7ada72d9452ddae19($fileIdentifier, $file);
|
||||
composerRequirec2735cf1989bce4d90aae3482b0d0dbd($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
@ -59,7 +59,7 @@ class ComposerAutoloaderInitccd99b2f8661e9a7ada72d9452ddae19
|
||||
* @param string $file
|
||||
* @return void
|
||||
*/
|
||||
function composerRequireccd99b2f8661e9a7ada72d9452ddae19($fileIdentifier, $file)
|
||||
function composerRequirec2735cf1989bce4d90aae3482b0d0dbd($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 ComposerStaticInitccd99b2f8661e9a7ada72d9452ddae19
|
||||
class ComposerStaticInitc2735cf1989bce4d90aae3482b0d0dbd
|
||||
{
|
||||
public static $files = array (
|
||||
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
|
||||
@ -3848,9 +3848,9 @@ class ComposerStaticInitccd99b2f8661e9a7ada72d9452ddae19
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitccd99b2f8661e9a7ada72d9452ddae19::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitccd99b2f8661e9a7ada72d9452ddae19::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitccd99b2f8661e9a7ada72d9452ddae19::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitc2735cf1989bce4d90aae3482b0d0dbd::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitc2735cf1989bce4d90aae3482b0d0dbd::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitc2735cf1989bce4d90aae3482b0d0dbd::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
10
vendor/scoper-autoload.php
vendored
10
vendor/scoper-autoload.php
vendored
@ -9,8 +9,8 @@ $loader = require_once __DIR__.'/autoload.php';
|
||||
if (!class_exists('AutoloadIncluder', false) && !interface_exists('AutoloadIncluder', false) && !trait_exists('AutoloadIncluder', false)) {
|
||||
spl_autoload_call('RectorPrefix20220303\AutoloadIncluder');
|
||||
}
|
||||
if (!class_exists('ComposerAutoloaderInitccd99b2f8661e9a7ada72d9452ddae19', false) && !interface_exists('ComposerAutoloaderInitccd99b2f8661e9a7ada72d9452ddae19', false) && !trait_exists('ComposerAutoloaderInitccd99b2f8661e9a7ada72d9452ddae19', false)) {
|
||||
spl_autoload_call('RectorPrefix20220303\ComposerAutoloaderInitccd99b2f8661e9a7ada72d9452ddae19');
|
||||
if (!class_exists('ComposerAutoloaderInitc2735cf1989bce4d90aae3482b0d0dbd', false) && !interface_exists('ComposerAutoloaderInitc2735cf1989bce4d90aae3482b0d0dbd', false) && !trait_exists('ComposerAutoloaderInitc2735cf1989bce4d90aae3482b0d0dbd', false)) {
|
||||
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)) {
|
||||
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());
|
||||
}
|
||||
}
|
||||
if (!function_exists('composerRequireccd99b2f8661e9a7ada72d9452ddae19')) {
|
||||
function composerRequireccd99b2f8661e9a7ada72d9452ddae19() {
|
||||
return \RectorPrefix20220303\composerRequireccd99b2f8661e9a7ada72d9452ddae19(...func_get_args());
|
||||
if (!function_exists('composerRequirec2735cf1989bce4d90aae3482b0d0dbd')) {
|
||||
function composerRequirec2735cf1989bce4d90aae3482b0d0dbd() {
|
||||
return \RectorPrefix20220303\composerRequirec2735cf1989bce4d90aae3482b0d0dbd(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('scanPath')) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user