mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-18 05:48:21 +01:00
Updated Rector to commit 88f17e9bb640c69d6b8ef31c6901ac71e2214c0d
88f17e9bb6
Remove array function from RemoveEmptyMethodCallRector as too narrow (#3930)
This commit is contained in:
parent
215231b596
commit
bbd4807a0e
@ -5,9 +5,7 @@ namespace Rector\DeadCode\Rector\MethodCall;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Arg;
|
||||
use PhpParser\Node\Expr\ArrowFunction;
|
||||
use PhpParser\Node\Expr\Assign;
|
||||
use PhpParser\Node\Expr\ConstFetch;
|
||||
use PhpParser\Node\Expr\MethodCall;
|
||||
use PhpParser\Node\Stmt\Class_;
|
||||
use PhpParser\Node\Stmt\ClassLike;
|
||||
@ -114,9 +112,6 @@ CODE_SAMPLE
|
||||
if ($parentNode instanceof Assign) {
|
||||
return $this->nodeFactory->createFalse();
|
||||
}
|
||||
if ($parentNode instanceof ArrowFunction && $this->nodeComparator->areNodesEqual($parentNode->expr, $node)) {
|
||||
return $this->processArrowFunction($parentNode, $node);
|
||||
}
|
||||
if (!$parentNode instanceof Expression) {
|
||||
return null;
|
||||
}
|
||||
@ -173,16 +168,4 @@ CODE_SAMPLE
|
||||
}
|
||||
return !$classMethod->isPrivate();
|
||||
}
|
||||
/**
|
||||
* @return \PhpParser\Node\Expr\MethodCall|\PhpParser\Node\Expr\ConstFetch
|
||||
*/
|
||||
private function processArrowFunction(ArrowFunction $arrowFunction, MethodCall $methodCall)
|
||||
{
|
||||
$parentParentNode = $arrowFunction->getAttribute(AttributeKey::PARENT_NODE);
|
||||
if ($parentParentNode instanceof Expression) {
|
||||
$this->removeNode($arrowFunction);
|
||||
return $methodCall;
|
||||
}
|
||||
return $this->nodeFactory->createFalse();
|
||||
}
|
||||
}
|
||||
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '112e490e3ca0d5949c97189c31fd4aef8833cfc1';
|
||||
public const PACKAGE_VERSION = '88f17e9bb640c69d6b8ef31c6901ac71e2214c0d';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2023-05-22 15:04:39';
|
||||
public const RELEASE_DATE = '2023-05-22 15:12:40';
|
||||
/**
|
||||
* @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 ComposerAutoloaderInit040f96abad6093fd2fa49efc3bc742c5::getLoader();
|
||||
return ComposerAutoloaderInit6deae8b04cda274c6d810597eaaa7ba6::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 ComposerAutoloaderInit040f96abad6093fd2fa49efc3bc742c5
|
||||
class ComposerAutoloaderInit6deae8b04cda274c6d810597eaaa7ba6
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,17 +22,17 @@ class ComposerAutoloaderInit040f96abad6093fd2fa49efc3bc742c5
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit040f96abad6093fd2fa49efc3bc742c5', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInit6deae8b04cda274c6d810597eaaa7ba6', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit040f96abad6093fd2fa49efc3bc742c5', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit6deae8b04cda274c6d810597eaaa7ba6', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit040f96abad6093fd2fa49efc3bc742c5::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit6deae8b04cda274c6d810597eaaa7ba6::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit040f96abad6093fd2fa49efc3bc742c5::$files;
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit6deae8b04cda274c6d810597eaaa7ba6::$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 ComposerStaticInit040f96abad6093fd2fa49efc3bc742c5
|
||||
class ComposerStaticInit6deae8b04cda274c6d810597eaaa7ba6
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
@ -3111,9 +3111,9 @@ class ComposerStaticInit040f96abad6093fd2fa49efc3bc742c5
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit040f96abad6093fd2fa49efc3bc742c5::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit040f96abad6093fd2fa49efc3bc742c5::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit040f96abad6093fd2fa49efc3bc742c5::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit6deae8b04cda274c6d810597eaaa7ba6::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit6deae8b04cda274c6d810597eaaa7ba6::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit6deae8b04cda274c6d810597eaaa7ba6::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user