1717use Symfony \Component \Form \FormRendererInterface ;
1818use Symfony \Component \Form \Util \InheritDataAwareIterator ;
1919use Symfony \Component \PropertyAccess \PropertyPathBuilder ;
20- use Symfony \Component \PropertyAccess \PropertyPathInterface ;
2120use Symfony \Component \PropertyAccess \PropertyPathIterator ;
2221use Symfony \Component \PropertyAccess \PropertyPathIteratorInterface ;
2322use 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 ) {
0 commit comments