Skip to content

Commit 4677e42

Browse files
committed
Changed iterable $forms to Traversable in the data mapper implementation example
1 parent 78eaf54 commit 4677e42

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

form/data_mappers.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ in your form type::
9898
/**
9999
* @param Color|null $viewData
100100
*/
101-
public function mapDataToForms($viewData, iterable $forms): void
101+
public function mapDataToForms($viewData, \Traversable $forms): void
102102
{
103103
// there is no data yet, so nothing to prepopulate
104104
if (null === $viewData) {
@@ -119,7 +119,7 @@ in your form type::
119119
$forms['blue']->setData($viewData->getBlue());
120120
}
121121

122-
public function mapFormsToData(iterable $forms, &$viewData): void
122+
public function mapFormsToData(\Traversable $forms, &$viewData): void
123123
{
124124
/** @var FormInterface[] $forms */
125125
$forms = iterator_to_array($forms);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy