@@ -167,8 +167,8 @@ public function setOptions($options)
167167 */
168168 public function add ($ elementOrFieldset , array $ flags = [])
169169 {
170- // TODO: find a better solution than duplicating the factory code, the problem being that if $elementOrFieldset is an array,
171- // it is passed by value, and we don't get back the concrete ElementInterface
170+ // TODO: find a better solution than duplicating the factory code, the problem being that if
171+ // $elementOrFieldset is an array, it is passed by value, and we don't get back the concrete ElementInterface
172172 if (is_array ($ elementOrFieldset )
173173 || ($ elementOrFieldset instanceof Traversable && ! $ elementOrFieldset instanceof ElementInterface)
174174 ) {
@@ -607,8 +607,8 @@ public function getValidationGroup()
607607 }
608608
609609 /**
610- * Prepare the validation group in case Collection elements were used (this function also handle the case where elements
611- * could have been dynamically added or removed from a collection using JavaScript)
610+ * Prepare the validation group in case Collection elements were used (this function also handle
611+ * the case where elements could have been dynamically added or removed from a collection using JavaScript)
612612 *
613613 * @param FieldsetInterface $formOrFieldset
614614 * @param array $data
@@ -766,7 +766,10 @@ public function attachInputFilterDefaults(InputFilterInterface $inputFilter, Fie
766766 $ elements = $ fieldset ->getElements ();
767767 }
768768
769- if (! $ fieldset instanceof Collection || ! $ fieldset ->getTargetElement () instanceof FieldsetInterface || $ inputFilter instanceof CollectionInputFilter) {
769+ if (! $ fieldset instanceof Collection
770+ || ! $ fieldset ->getTargetElement () instanceof FieldsetInterface
771+ || $ inputFilter instanceof CollectionInputFilter
772+ ) {
770773 foreach ($ elements as $ name => $ element ) {
771774 if ($ this ->preferFormInputFilter && $ inputFilter ->has ($ name )) {
772775 continue ;
0 commit comments