Add some phpdocs for IDE autocompletion and better SCA
This commit is contained in:
parent
ee58cfcf10
commit
d30c751781
|
@ -15,6 +15,7 @@ use Symfony\Component\Form\FormEvents;
|
|||
use Symfony\Component\Form\FormEvent;
|
||||
use Symfony\Component\Form\Exception\UnexpectedTypeException;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
use Symfony\Component\Form\FormInterface;
|
||||
|
||||
/**
|
||||
* Resize a collection form element based on the data sent from the client.
|
||||
|
@ -146,6 +147,7 @@ class ResizeFormListener implements EventSubscriberInterface
|
|||
|
||||
if ($this->deleteEmpty) {
|
||||
$previousData = $event->getForm()->getData();
|
||||
/** @var FormInterface $child */
|
||||
foreach ($form as $name => $child) {
|
||||
$isNew = !isset($previousData[$name]);
|
||||
|
||||
|
|
|
@ -120,6 +120,7 @@ class ChoiceType extends AbstractType
|
|||
// Reconstruct the data as mapping from child names to values
|
||||
$data = array();
|
||||
|
||||
/** @var FormInterface $child */
|
||||
foreach ($form as $child) {
|
||||
$value = $child->getConfig()->getOption('value');
|
||||
|
||||
|
|
|
@ -83,6 +83,7 @@ class FormValidator extends ConstraintValidator
|
|||
} else {
|
||||
$childrenSynchronized = true;
|
||||
|
||||
/** @var FormInterface $child */
|
||||
foreach ($form as $child) {
|
||||
if (!$child->isSynchronized()) {
|
||||
$childrenSynchronized = false;
|
||||
|
|
Reference in New Issue