mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-18 05:48:21 +01:00
Updated Rector to commit d288f4c41dbcd2a095a1cf11b3b4d6e989973394
d288f4c41d
Remove removeNode() from RemoveUnusedPrivateMethodRector (#4067)
This commit is contained in:
parent
bd7d3c46f2
commit
2813830091
@ -78,19 +78,22 @@ CODE_SAMPLE
|
||||
if ($this->hasDynamicMethodCallOnFetchThis($node)) {
|
||||
return null;
|
||||
}
|
||||
if ($node->getMethods() === []) {
|
||||
return null;
|
||||
}
|
||||
$hasChanged = \false;
|
||||
$classReflection = null;
|
||||
foreach ($node->getMethods() as $classMethod) {
|
||||
if (!$classReflection instanceof ClassReflection) {
|
||||
$classReflection = $this->reflectionResolver->resolveClassReflection($classMethod);
|
||||
}
|
||||
if ($this->shouldSkip($classMethod, $classReflection)) {
|
||||
$classReflection = $this->reflectionResolver->resolveClassReflection($node);
|
||||
foreach ($node->stmts as $key => $stmt) {
|
||||
if (!$stmt instanceof ClassMethod) {
|
||||
continue;
|
||||
}
|
||||
if ($this->isClassMethodUsedAnalyzer->isClassMethodUsed($node, $classMethod, $scope)) {
|
||||
if ($this->shouldSkip($stmt, $classReflection)) {
|
||||
continue;
|
||||
}
|
||||
$this->removeNode($classMethod);
|
||||
if ($this->isClassMethodUsedAnalyzer->isClassMethodUsed($node, $stmt, $scope)) {
|
||||
continue;
|
||||
}
|
||||
unset($node->stmts[$key]);
|
||||
$hasChanged = \true;
|
||||
}
|
||||
if ($hasChanged) {
|
||||
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = 'cd776a822655f90311b0e1e925df138d24f147a1';
|
||||
public const PACKAGE_VERSION = 'd288f4c41dbcd2a095a1cf11b3b4d6e989973394';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2023-06-04 18:03:06';
|
||||
public const RELEASE_DATE = '2023-06-04 18:06:02';
|
||||
/**
|
||||
* @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 ComposerAutoloaderInit64bb87837d970e08d2b427470a313d61::getLoader();
|
||||
return ComposerAutoloaderInitb99bf3c239db82dbb7d1a7a8b79e1bdb::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 ComposerAutoloaderInit64bb87837d970e08d2b427470a313d61
|
||||
class ComposerAutoloaderInitb99bf3c239db82dbb7d1a7a8b79e1bdb
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,17 +22,17 @@ class ComposerAutoloaderInit64bb87837d970e08d2b427470a313d61
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit64bb87837d970e08d2b427470a313d61', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInitb99bf3c239db82dbb7d1a7a8b79e1bdb', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit64bb87837d970e08d2b427470a313d61', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitb99bf3c239db82dbb7d1a7a8b79e1bdb', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit64bb87837d970e08d2b427470a313d61::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitb99bf3c239db82dbb7d1a7a8b79e1bdb::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit64bb87837d970e08d2b427470a313d61::$files;
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInitb99bf3c239db82dbb7d1a7a8b79e1bdb::$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 ComposerStaticInit64bb87837d970e08d2b427470a313d61
|
||||
class ComposerStaticInitb99bf3c239db82dbb7d1a7a8b79e1bdb
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
@ -3055,9 +3055,9 @@ class ComposerStaticInit64bb87837d970e08d2b427470a313d61
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit64bb87837d970e08d2b427470a313d61::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit64bb87837d970e08d2b427470a313d61::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit64bb87837d970e08d2b427470a313d61::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitb99bf3c239db82dbb7d1a7a8b79e1bdb::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitb99bf3c239db82dbb7d1a7a8b79e1bdb::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitb99bf3c239db82dbb7d1a7a8b79e1bdb::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user