Skip to content

Commit 12ff984

Browse files
author
wietse
committed
feat: stub DataMapperInterface
Ensure TData of FormInterface is provided Set TData on mixed since we don't know the type of the child forms Add template for in DataMapperInterface refs: phpstan#417
1 parent 1ef4dce commit 12ff984

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
namespace Symfony\Component\Form;
4+
5+
/**
6+
* @template TViewData
7+
*/
8+
interface DataMapperInterface
9+
{
10+
/**
11+
* @param TViewData $viewData
12+
* @param \Traversable<mixed, FormInterface<mixed>> $forms
13+
*/
14+
public function mapDataToForms(mixed $viewData, \Traversable $forms): void;
15+
16+
/**
17+
* @param \Traversable<mixed, FormInterface<mixed>> $forms
18+
* @param TViewData $viewData
19+
*/
20+
public function mapFormsToData(\Traversable $forms, mixed &$viewData): void;
21+
}

0 commit comments

Comments
 (0)