Skip to content

Commit

Permalink
chore: fix phpcs + nikic/php-parser@4 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
qkdreyer committed Feb 26, 2024
1 parent 23705e5 commit 5aa1771
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Tests/Translation/Extractor/File/Fixture/MyFormType.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@ public function buildForm(FormBuilderInterface $builder, array $options)
]);
}

const CHOICES = ['choices' => [null]];
public const CHOICES = ['choices' => [null]];
}
2 changes: 1 addition & 1 deletion Translation/Extractor/File/FormExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ protected function parseChoiceNode(Node $item, Node $node, $domain)
foreach ($item->value->items as $index => $subItem) {
$newItem = clone $subItem;
$newItem->key = $subItem->value;
$newItem->value = $subItem->key ?? new Node\Scalar\Int_($index);
$newItem->value = $subItem->key ?? new Node\Scalar\LNumber($index);
$subItem = $newItem;
$this->parseItem($subItem, $domain);
}
Expand Down

0 comments on commit 5aa1771

Please sign in to comment.