mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-18 05:48:21 +01:00
Updated Rector to commit 951e9f9643fcfde430aa5784596454838c6c8cb0
951e9f9643
[DeadCode] Skip used as assign var next on RemoveJustPropertyFetchRector (#3605)
This commit is contained in:
parent
1284f3ba6e
commit
f6fb04983f
@ -11,6 +11,7 @@ use Rector\Core\PhpParser\Comparing\NodeComparator;
|
||||
use Rector\Core\PhpParser\Node\BetterNodeFinder;
|
||||
use Rector\NodeNameResolver\NodeNameResolver;
|
||||
use Rector\NodeNestingScope\NodeFinder\ScopeAwareNodeFinder;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
final class NodeUsageFinder
|
||||
{
|
||||
/**
|
||||
@ -57,7 +58,11 @@ final class NodeUsageFinder
|
||||
if ($node === $variable) {
|
||||
return \false;
|
||||
}
|
||||
return $this->nodeNameResolver->isName($node, $variableName);
|
||||
if (!$this->nodeNameResolver->isName($node, $variableName)) {
|
||||
return \false;
|
||||
}
|
||||
$assignedTo = $node->getAttribute(AttributeKey::ASSIGNED_TO);
|
||||
return !$assignedTo instanceof Node;
|
||||
});
|
||||
}
|
||||
public function findPreviousForeachNodeUsage(Foreach_ $foreach, Expr $expr) : ?Node
|
||||
|
@ -58,13 +58,13 @@ CODE_SAMPLE
|
||||
Assert::allString($configuration);
|
||||
$this->removedFunctions = $configuration;
|
||||
}
|
||||
private function removeNodeIfNeeded(Expression $node, FuncCall $expr) : void
|
||||
private function removeNodeIfNeeded(Expression $expression, FuncCall $funcCall) : void
|
||||
{
|
||||
foreach ($this->removedFunctions as $removedFunction) {
|
||||
if (!$this->isName($expr->name, $removedFunction)) {
|
||||
if (!$this->isName($funcCall->name, $removedFunction)) {
|
||||
continue;
|
||||
}
|
||||
$this->removeNode($node);
|
||||
$this->removeNode($expression);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '7cc59fe5f3f7cb697c707e8968f1ead67b4efd2f';
|
||||
public const PACKAGE_VERSION = '951e9f9643fcfde430aa5784596454838c6c8cb0';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2023-04-10 15:46:34';
|
||||
public const RELEASE_DATE = '2023-04-11 06:53:48';
|
||||
/**
|
||||
* @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 ComposerAutoloaderInit363d6417ad3cc62d15601ee0ae94a11c::getLoader();
|
||||
return ComposerAutoloaderInit302c682738f89e0d621bb3cef995289e::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 ComposerAutoloaderInit363d6417ad3cc62d15601ee0ae94a11c
|
||||
class ComposerAutoloaderInit302c682738f89e0d621bb3cef995289e
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,17 +22,17 @@ class ComposerAutoloaderInit363d6417ad3cc62d15601ee0ae94a11c
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit363d6417ad3cc62d15601ee0ae94a11c', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInit302c682738f89e0d621bb3cef995289e', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit363d6417ad3cc62d15601ee0ae94a11c', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit302c682738f89e0d621bb3cef995289e', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit363d6417ad3cc62d15601ee0ae94a11c::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit302c682738f89e0d621bb3cef995289e::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit363d6417ad3cc62d15601ee0ae94a11c::$files;
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit302c682738f89e0d621bb3cef995289e::$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 ComposerStaticInit363d6417ad3cc62d15601ee0ae94a11c
|
||||
class ComposerStaticInit302c682738f89e0d621bb3cef995289e
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
@ -3138,9 +3138,9 @@ class ComposerStaticInit363d6417ad3cc62d15601ee0ae94a11c
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit363d6417ad3cc62d15601ee0ae94a11c::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit363d6417ad3cc62d15601ee0ae94a11c::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit363d6417ad3cc62d15601ee0ae94a11c::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit302c682738f89e0d621bb3cef995289e::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit302c682738f89e0d621bb3cef995289e::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit302c682738f89e0d621bb3cef995289e::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user