mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-18 22:08:00 +01:00
Updated Rector to commit d36ee6357b3bce3e743b6dac26dca976d9228eba
d36ee6357b
[CodingStyle] Skip PreslashSimpleFunctionRector on function defined previous call (#284)
This commit is contained in:
parent
650e9d7876
commit
10c6241f66
@ -6,6 +6,7 @@ namespace Rector\CodingStyle\Rector\FuncCall;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr\FuncCall;
|
||||
use PhpParser\Node\Name\FullyQualified;
|
||||
use PhpParser\Node\Stmt\Function_;
|
||||
use Rector\Core\Rector\AbstractRector;
|
||||
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
|
||||
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
||||
@ -60,6 +61,15 @@ CODE_SAMPLE
|
||||
if (\strpos($functionName, '\\') !== \false) {
|
||||
return null;
|
||||
}
|
||||
$isDefinedPreviousCall = (bool) $this->betterNodeFinder->findFirstPreviousOfNode($node, function (\PhpParser\Node $node) use($functionName) : bool {
|
||||
if (!$node instanceof \PhpParser\Node\Stmt\Function_) {
|
||||
return \false;
|
||||
}
|
||||
return $this->isName($node->name, $functionName);
|
||||
});
|
||||
if ($isDefinedPreviousCall) {
|
||||
return null;
|
||||
}
|
||||
$node->name = new \PhpParser\Node\Name\FullyQualified($functionName);
|
||||
return $node;
|
||||
}
|
||||
|
@ -16,11 +16,11 @@ final class VersionResolver
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = 'b028d5633a3bad2c44d6a946c912153610227b52';
|
||||
public const PACKAGE_VERSION = 'd36ee6357b3bce3e743b6dac26dca976d9228eba';
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2021-06-24 09:56:29';
|
||||
public const RELEASE_DATE = '2021-06-24 12:49:00';
|
||||
public static function resolvePackageVersion() : string
|
||||
{
|
||||
$process = new \RectorPrefix20210624\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__);
|
||||
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
@ -4,4 +4,4 @@
|
||||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInit23e47ef9f503dfeb0b09821512271fc7::getLoader();
|
||||
return ComposerAutoloaderInit2f86d4810f904e6d2d219c0292331514::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 ComposerAutoloaderInit23e47ef9f503dfeb0b09821512271fc7
|
||||
class ComposerAutoloaderInit2f86d4810f904e6d2d219c0292331514
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,15 +22,15 @@ class ComposerAutoloaderInit23e47ef9f503dfeb0b09821512271fc7
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit23e47ef9f503dfeb0b09821512271fc7', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInit2f86d4810f904e6d2d219c0292331514', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit23e47ef9f503dfeb0b09821512271fc7', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit2f86d4810f904e6d2d219c0292331514', '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\ComposerStaticInit23e47ef9f503dfeb0b09821512271fc7::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit2f86d4810f904e6d2d219c0292331514::getInitializer($loader));
|
||||
} else {
|
||||
$classMap = require __DIR__ . '/autoload_classmap.php';
|
||||
if ($classMap) {
|
||||
@ -42,19 +42,19 @@ class ComposerAutoloaderInit23e47ef9f503dfeb0b09821512271fc7
|
||||
$loader->register(true);
|
||||
|
||||
if ($useStaticLoader) {
|
||||
$includeFiles = Composer\Autoload\ComposerStaticInit23e47ef9f503dfeb0b09821512271fc7::$files;
|
||||
$includeFiles = Composer\Autoload\ComposerStaticInit2f86d4810f904e6d2d219c0292331514::$files;
|
||||
} else {
|
||||
$includeFiles = require __DIR__ . '/autoload_files.php';
|
||||
}
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequire23e47ef9f503dfeb0b09821512271fc7($fileIdentifier, $file);
|
||||
composerRequire2f86d4810f904e6d2d219c0292331514($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
}
|
||||
}
|
||||
|
||||
function composerRequire23e47ef9f503dfeb0b09821512271fc7($fileIdentifier, $file)
|
||||
function composerRequire2f86d4810f904e6d2d219c0292331514($fileIdentifier, $file)
|
||||
{
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
require $file;
|
||||
|
8
vendor/composer/autoload_static.php
vendored
8
vendor/composer/autoload_static.php
vendored
@ -4,7 +4,7 @@
|
||||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInit23e47ef9f503dfeb0b09821512271fc7
|
||||
class ComposerStaticInit2f86d4810f904e6d2d219c0292331514
|
||||
{
|
||||
public static $files = array (
|
||||
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
|
||||
@ -3875,9 +3875,9 @@ class ComposerStaticInit23e47ef9f503dfeb0b09821512271fc7
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit23e47ef9f503dfeb0b09821512271fc7::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit23e47ef9f503dfeb0b09821512271fc7::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit23e47ef9f503dfeb0b09821512271fc7::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit2f86d4810f904e6d2d219c0292331514::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit2f86d4810f904e6d2d219c0292331514::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit2f86d4810f904e6d2d219c0292331514::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
10
vendor/scoper-autoload.php
vendored
10
vendor/scoper-autoload.php
vendored
@ -21,8 +21,8 @@ if (!class_exists('SomeTestCase', false) && !interface_exists('SomeTestCase', fa
|
||||
if (!class_exists('CheckoutEntityFactory', false) && !interface_exists('CheckoutEntityFactory', false) && !trait_exists('CheckoutEntityFactory', false)) {
|
||||
spl_autoload_call('RectorPrefix20210624\CheckoutEntityFactory');
|
||||
}
|
||||
if (!class_exists('ComposerAutoloaderInit23e47ef9f503dfeb0b09821512271fc7', false) && !interface_exists('ComposerAutoloaderInit23e47ef9f503dfeb0b09821512271fc7', false) && !trait_exists('ComposerAutoloaderInit23e47ef9f503dfeb0b09821512271fc7', false)) {
|
||||
spl_autoload_call('RectorPrefix20210624\ComposerAutoloaderInit23e47ef9f503dfeb0b09821512271fc7');
|
||||
if (!class_exists('ComposerAutoloaderInit2f86d4810f904e6d2d219c0292331514', false) && !interface_exists('ComposerAutoloaderInit2f86d4810f904e6d2d219c0292331514', false) && !trait_exists('ComposerAutoloaderInit2f86d4810f904e6d2d219c0292331514', false)) {
|
||||
spl_autoload_call('RectorPrefix20210624\ComposerAutoloaderInit2f86d4810f904e6d2d219c0292331514');
|
||||
}
|
||||
if (!class_exists('Doctrine\Inflector\Inflector', false) && !interface_exists('Doctrine\Inflector\Inflector', false) && !trait_exists('Doctrine\Inflector\Inflector', false)) {
|
||||
spl_autoload_call('RectorPrefix20210624\Doctrine\Inflector\Inflector');
|
||||
@ -3323,9 +3323,9 @@ if (!function_exists('print_node')) {
|
||||
return \RectorPrefix20210624\print_node(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('composerRequire23e47ef9f503dfeb0b09821512271fc7')) {
|
||||
function composerRequire23e47ef9f503dfeb0b09821512271fc7() {
|
||||
return \RectorPrefix20210624\composerRequire23e47ef9f503dfeb0b09821512271fc7(...func_get_args());
|
||||
if (!function_exists('composerRequire2f86d4810f904e6d2d219c0292331514')) {
|
||||
function composerRequire2f86d4810f904e6d2d219c0292331514() {
|
||||
return \RectorPrefix20210624\composerRequire2f86d4810f904e6d2d219c0292331514(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('parseArgs')) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user