mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-17 21:38:22 +01:00
Updated Rector to commit f6fa83409bd80bf25f0677988100709c2ad7ab38
f6fa83409b
[Php81] Skip reassign on array destruct on ReadOnlyPropertyRector (#6596)
This commit is contained in:
parent
7bf0acdccc
commit
3e53616d72
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '3e2e579e4753ac559fa1c075ea51b1c5df86532e';
|
||||
public const PACKAGE_VERSION = 'f6fa83409bd80bf25f0677988100709c2ad7ab38';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2024-12-16 18:36:47';
|
||||
public const RELEASE_DATE = '2024-12-16 20:26:24';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
@ -4,9 +4,11 @@ declare (strict_types=1);
|
||||
namespace Rector\NodeTypeResolver\PHPStan\Scope\NodeVisitor;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\ArrayItem;
|
||||
use PhpParser\Node\Expr\Assign;
|
||||
use PhpParser\Node\Expr\AssignOp;
|
||||
use PhpParser\Node\Expr\AssignRef;
|
||||
use PhpParser\Node\Expr\List_;
|
||||
use PhpParser\NodeVisitorAbstract;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
use Rector\NodeTypeResolver\PHPStan\Scope\Contract\NodeVisitor\ScopeResolverNodeVisitorInterface;
|
||||
@ -29,6 +31,13 @@ final class AssignedToNodeVisitor extends NodeVisitorAbstract implements ScopeRe
|
||||
return null;
|
||||
}
|
||||
$node->var->setAttribute(AttributeKey::IS_BEING_ASSIGNED, \true);
|
||||
if ($node->var instanceof List_) {
|
||||
foreach ($node->var->items as $item) {
|
||||
if ($item instanceof ArrayItem) {
|
||||
$item->value->setAttribute(AttributeKey::IS_BEING_ASSIGNED, \true);
|
||||
}
|
||||
}
|
||||
}
|
||||
$node->expr->setAttribute(AttributeKey::IS_ASSIGNED_TO, \true);
|
||||
if ($node->expr instanceof Assign) {
|
||||
$node->var->setAttribute(AttributeKey::IS_MULTI_ASSIGN, \true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user