Skip to content

Commit 5aa1771

Browse files
committed
chore: fix phpcs + nikic/php-parser@4 compatibility
1 parent 23705e5 commit 5aa1771

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: Tests/Translation/Extractor/File/Fixture/MyFormType.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,5 @@ public function buildForm(FormBuilderInterface $builder, array $options)
6868
]);
6969
}
7070

71-
const CHOICES = ['choices' => [null]];
71+
public const CHOICES = ['choices' => [null]];
7272
}

Diff for: Translation/Extractor/File/FormExtractor.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ protected function parseChoiceNode(Node $item, Node $node, $domain)
244244
foreach ($item->value->items as $index => $subItem) {
245245
$newItem = clone $subItem;
246246
$newItem->key = $subItem->value;
247-
$newItem->value = $subItem->key ?? new Node\Scalar\Int_($index);
247+
$newItem->value = $subItem->key ?? new Node\Scalar\LNumber($index);
248248
$subItem = $newItem;
249249
$this->parseItem($subItem, $domain);
250250
}

0 commit comments

Comments
 (0)