Skip to content

Commit d364472

Browse files
ThomasLandauernicolas-grekas
authored andcommitted
[Form] Adding @var PHPDoc to silence psalm
1 parent 4e06f53 commit d364472

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
use Symfony\Component\Form\ChoiceList\View\ChoiceGroupView;
3131
use Symfony\Component\Form\ChoiceList\View\ChoiceListView;
3232
use Symfony\Component\Form\ChoiceList\View\ChoiceView;
33+
use Symfony\Component\Form\Event\PreSubmitEvent;
3334
use Symfony\Component\Form\Exception\TransformationFailedException;
3435
use Symfony\Component\Form\Extension\Core\DataMapper\CheckboxListMapper;
3536
use Symfony\Component\Form\Extension\Core\DataMapper\RadioListMapper;
@@ -101,6 +102,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)
101102
// Make sure that scalar, submitted values are converted to arrays
102103
// which can be submitted to the checkboxes/radio buttons
103104
$builder->addEventListener(FormEvents::PRE_SUBMIT, static function (FormEvent $event) use ($choiceList, $options, &$unknownValues) {
105+
/** @var PreSubmitEvent $event */
104106
$form = $event->getForm();
105107
$data = $event->getData();
106108

0 commit comments

Comments
 (0)