Skip to content

Commit 0f30d27

Browse files
Remove some unneeded var annotations
1 parent f687c00 commit 0f30d27

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

Extension/Core/Type/ChoiceType.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
100100
if ($options['expanded'] || $options['multiple']) {
101101
// Make sure that scalar, submitted values are converted to arrays
102102
// which can be submitted to the checkboxes/radio buttons
103-
$builder->addEventListener(FormEvents::PRE_SUBMIT, static function (FormEvent $event) use ($choiceList, $options, &$unknownValues) {
104-
/** @var PreSubmitEvent $event */
103+
$builder->addEventListener(FormEvents::PRE_SUBMIT, static function (PreSubmitEvent $event) use ($choiceList, $options, &$unknownValues) {
105104
$form = $event->getForm();
106105
$data = $event->getData();
107106

Extension/Validator/ViolationMapper/ViolationMapper.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
use Symfony\Component\Form\FormRendererInterface;
1818
use Symfony\Component\Form\Util\InheritDataAwareIterator;
1919
use Symfony\Component\PropertyAccess\PropertyPathBuilder;
20-
use Symfony\Component\PropertyAccess\PropertyPathInterface;
2120
use Symfony\Component\PropertyAccess\PropertyPathIterator;
2221
use Symfony\Component\PropertyAccess\PropertyPathIteratorInterface;
2322
use Symfony\Component\Validator\Constraints\File;
@@ -229,6 +228,7 @@ private function matchChild(FormInterface $form, PropertyPathIteratorInterface $
229228
$foundAtIndex = null;
230229

231230
// Construct mapping rules for the given form
231+
/** @var MappingRule[] $rules */
232232
$rules = [];
233233

234234
foreach ($form->getConfig()->getOption('error_mapping') as $propertyPath => $targetPath) {
@@ -238,6 +238,7 @@ private function matchChild(FormInterface $form, PropertyPathIteratorInterface $
238238
}
239239
}
240240

241+
/** @var FormInterface[] $children */
241242
$children = iterator_to_array(new \RecursiveIteratorIterator(new InheritDataAwareIterator($form)), false);
242243

243244
while ($it->valid()) {
@@ -249,8 +250,6 @@ private function matchChild(FormInterface $form, PropertyPathIteratorInterface $
249250

250251
// Test mapping rules as long as we have any
251252
foreach ($rules as $key => $rule) {
252-
/** @var MappingRule $rule */
253-
254253
// Mapping rule matches completely, terminate.
255254
if (null !== ($form = $rule->match($chunk))) {
256255
return $form;
@@ -262,7 +261,6 @@ private function matchChild(FormInterface $form, PropertyPathIteratorInterface $
262261
}
263262
}
264263

265-
/** @var FormInterface $child */
266264
foreach ($children as $i => $child) {
267265
$childPath = (string) $child->getPropertyPath();
268266
if ($childPath === $chunk) {
@@ -313,7 +311,6 @@ private function reconstructPath(ViolationPath $violationPath, FormInterface $or
313311
// Cut the piece out of the property path and proceed
314312
$propertyPathBuilder->remove($i);
315313
} else {
316-
/** @var PropertyPathInterface $propertyPath */
317314
$propertyPath = $scope->getPropertyPath();
318315

319316
if (null === $propertyPath) {

ResolvedFormType.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ public function finishView(FormView $view, FormInterface $form, array $options):
117117

118118
$this->innerType->finishView($view, $form, $options);
119119

120-
/** @var FormTypeExtensionInterface $extension */
121120
foreach ($this->typeExtensions as $extension) {
122121
$extension->finishView($view, $form, $options);
123122
}

0 commit comments

Comments
 (0)