Skip to content

Commit 0b52330

Browse files
author
JefvdA
committed
feat: added stub for 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 c08cd8e commit 0b52330

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
3+
namespace Symfony\Component\Form;
4+
5+
/**
6+
* @template TViewData
7+
*/
8+
interface DataMapperInterface
9+
{
10+
/**
11+
* @param TViewData|null $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|null $viewData
19+
* @param-out TViewData $viewData
20+
*/
21+
public function mapFormsToData(\Traversable $forms, mixed &$viewData): void;
22+
}

0 commit comments

Comments
 (0)