Skip to content

Commit a40457a

Browse files
committed
Add some phpdocs for IDE autocompletion and better SCA
1 parent d3183b1 commit a40457a

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

Extension/Core/EventListener/ResizeFormListener.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Symfony\Component\Form\FormEvent;
1616
use Symfony\Component\Form\Exception\UnexpectedTypeException;
1717
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
18+
use Symfony\Component\Form\FormInterface;
1819

1920
/**
2021
* Resize a collection form element based on the data sent from the client.
@@ -146,6 +147,7 @@ public function onSubmit(FormEvent $event)
146147

147148
if ($this->deleteEmpty) {
148149
$previousData = $event->getForm()->getData();
150+
/** @var FormInterface $child */
149151
foreach ($form as $name => $child) {
150152
$isNew = !isset($previousData[$name]);
151153

Extension/Core/Type/ChoiceType.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)
120120
// Reconstruct the data as mapping from child names to values
121121
$data = array();
122122

123+
/** @var FormInterface $child */
123124
foreach ($form as $child) {
124125
$value = $child->getConfig()->getOption('value');
125126

Extension/Validator/Constraints/FormValidator.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ public function validate($form, Constraint $constraint)
8383
} else {
8484
$childrenSynchronized = true;
8585

86+
/** @var FormInterface $child */
8687
foreach ($form as $child) {
8788
if (!$child->isSynchronized()) {
8889
$childrenSynchronized = false;

0 commit comments

Comments
 (0)