Skip to content

Commit 6f67935

Browse files
[PHPUnit100] Skip already key = null on RemoveNamedArgsInDataProviderRector (#475)
* [PHPUnit100] Skip already key = null on RemoveNamedArgsInDataProviderRector * [ci-review] Rector Rectify --------- Co-authored-by: GitHub Action <actions@github.com>
1 parent bc6349b commit 6f67935

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

rules/PHPUnit100/Rector/Class_/RemoveNamedArgsInDataProviderRector.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@ private function handleArray(Array_ $array): bool
128128
continue;
129129
}
130130

131+
if (! $item->key instanceof Expr) {
132+
continue;
133+
}
134+
131135
if (! $item->key instanceof Int_ && $item->key instanceof Expr) {
132136
$item->key = null;
133137
$hasChanged = true;

0 commit comments

Comments
 (0)