Skip to content

Commit 4c6ed0d

Browse files
committed
[CodeQuality] Handle property fetch and common nodes crash on InlineArrayReturnAssignRector
1 parent c648be5 commit 4c6ed0d

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

src/PhpParser/Node/NodeFactory.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -426,12 +426,8 @@ private function createArrayItem(mixed $item, string | int | null $key = null):
426426
return new ArrayItem($item);
427427
}
428428

429-
$nodeClass = $item;
430-
throw new NotImplementedYetException(sprintf(
431-
'Not implemented yet. Go to "%s()" and add check for "%s" node.',
432-
__METHOD__,
433-
(string) $nodeClass
434-
));
429+
$itemValue = BuilderHelpers::normalizeValue($item);
430+
return new ArrayItem($itemValue);
435431
}
436432

437433
private function decorateArrayItemWithKey(int | string | null $key, ArrayItem $arrayItem): void

0 commit comments

Comments
 (0)