mirror of
https://github.com/rectorphp/rector.git
synced 2025-04-17 05:52:35 +02:00
Updated Rector to commit 57b9ccfb1404a455591a3d405377e46a71528f11
57b9ccfb14
[Php71] Skip already array destruct on ListToArrayDestructRector (#6460)
This commit is contained in:
parent
018eb31f35
commit
8b18794be6
@ -8,6 +8,7 @@ use PhpParser\Node\Expr\Array_;
|
||||
use PhpParser\Node\Expr\Assign;
|
||||
use PhpParser\Node\Expr\List_;
|
||||
use PhpParser\Node\Stmt\Foreach_;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
use Rector\Rector\AbstractRector;
|
||||
use Rector\ValueObject\PhpVersionFeature;
|
||||
use Rector\VersionBonding\Contract\MinPhpVersionInterface;
|
||||
@ -62,6 +63,9 @@ CODE_SAMPLE
|
||||
if (!$node->var instanceof List_) {
|
||||
return null;
|
||||
}
|
||||
if ($node->var->getAttribute(AttributeKey::KIND) === List_::KIND_ARRAY) {
|
||||
return null;
|
||||
}
|
||||
$list = $node->var;
|
||||
$node->var = new Array_($list->items);
|
||||
return $node;
|
||||
@ -69,6 +73,9 @@ CODE_SAMPLE
|
||||
if (!$node->valueVar instanceof List_) {
|
||||
return null;
|
||||
}
|
||||
if ($node->valueVar->getAttribute(AttributeKey::KIND) === List_::KIND_ARRAY) {
|
||||
return null;
|
||||
}
|
||||
$list = $node->valueVar;
|
||||
$node->valueVar = new Array_($list->items);
|
||||
return $node;
|
||||
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '20cc149e465d1dbd2991784f52e32c214aba6000';
|
||||
public const PACKAGE_VERSION = '57b9ccfb1404a455591a3d405377e46a71528f11';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2024-11-21 09:12:37';
|
||||
public const RELEASE_DATE = '2024-11-21 09:37:59';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user