mirror of
https://github.com/rectorphp/rector.git
synced 2025-03-14 20:39:43 +01:00
Updated Rector to commit c0983f1000c1ca67b23d6da0c7f43eede90d14db
c0983f1000
Skip coalsce assign in RemoveUnusedPrivatePropertyRector (#4491)
This commit is contained in:
parent
a2e84092f6
commit
fe7bab8799
@ -6,6 +6,7 @@ namespace Rector\NodeTypeResolver\PHPStan\Scope\NodeVisitor;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr\Assign;
|
||||
use PhpParser\Node\Expr\AssignOp;
|
||||
use PhpParser\Node\Expr\AssignOp\Coalesce;
|
||||
use PhpParser\NodeVisitorAbstract;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
use Rector\NodeTypeResolver\PHPStan\Scope\Contract\NodeVisitor\ScopeResolverNodeVisitorInterface;
|
||||
@ -19,6 +20,9 @@ final class AssignedToNodeVisitor extends NodeVisitorAbstract implements ScopeRe
|
||||
if (!$node instanceof Assign && !$node instanceof AssignOp) {
|
||||
return null;
|
||||
}
|
||||
if ($node instanceof Coalesce) {
|
||||
$node->var->setAttribute(AttributeKey::IS_ASSIGNED_TO, \true);
|
||||
}
|
||||
$node->var->setAttribute(AttributeKey::IS_BEING_ASSIGNED, \true);
|
||||
$node->expr->setAttribute(AttributeKey::IS_ASSIGNED_TO, \true);
|
||||
if ($node->expr instanceof Assign) {
|
||||
|
@ -42,6 +42,9 @@ final class PropertyWriteonlyAnalyzer
|
||||
if ((bool) $propertyFetch->getAttribute(AttributeKey::IS_MULTI_ASSIGN, \false)) {
|
||||
return \false;
|
||||
}
|
||||
if ((bool) $propertyFetch->getAttribute(AttributeKey::IS_ASSIGNED_TO, \false)) {
|
||||
return \false;
|
||||
}
|
||||
if ((bool) $propertyFetch->getAttribute(AttributeKey::IS_BEING_ASSIGNED, \false)) {
|
||||
continue;
|
||||
}
|
||||
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '84afeaf9870b3b3405dbc906c2c795f02b101fcd';
|
||||
public const PACKAGE_VERSION = 'c0983f1000c1ca67b23d6da0c7f43eede90d14db';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2023-07-12 08:51:51';
|
||||
public const RELEASE_DATE = '2023-07-12 10:49:32';
|
||||
/**
|
||||
* @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 ComposerAutoloaderInit91812dba6abedb7450acc01f3f66b142::getLoader();
|
||||
return ComposerAutoloaderInit39bae24693f47a09bacc05054188f12e::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 ComposerAutoloaderInit91812dba6abedb7450acc01f3f66b142
|
||||
class ComposerAutoloaderInit39bae24693f47a09bacc05054188f12e
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,17 +22,17 @@ class ComposerAutoloaderInit91812dba6abedb7450acc01f3f66b142
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit91812dba6abedb7450acc01f3f66b142', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInit39bae24693f47a09bacc05054188f12e', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit91812dba6abedb7450acc01f3f66b142', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit39bae24693f47a09bacc05054188f12e', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit91812dba6abedb7450acc01f3f66b142::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit39bae24693f47a09bacc05054188f12e::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit91812dba6abedb7450acc01f3f66b142::$files;
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit39bae24693f47a09bacc05054188f12e::$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 ComposerStaticInit91812dba6abedb7450acc01f3f66b142
|
||||
class ComposerStaticInit39bae24693f47a09bacc05054188f12e
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
@ -3062,9 +3062,9 @@ class ComposerStaticInit91812dba6abedb7450acc01f3f66b142
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit91812dba6abedb7450acc01f3f66b142::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit91812dba6abedb7450acc01f3f66b142::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit91812dba6abedb7450acc01f3f66b142::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit39bae24693f47a09bacc05054188f12e::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit39bae24693f47a09bacc05054188f12e::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit39bae24693f47a09bacc05054188f12e::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user