Skip to content

Commit 9ac3715

Browse files
More
1 parent c892dc2 commit 9ac3715

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

stubs/Symfony/Component/Form/FormBuilderInterface.stub

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,9 @@ namespace Symfony\Component\Form;
1111
interface FormBuilderInterface extends \Traversable, \Countable, FormConfigBuilderInterface
1212
{
1313

14+
/**
15+
* @return FormInterface<TData|null>
16+
*/
17+
public function getForm(): FormInterface;
18+
1419
}

tests/Type/Symfony/data/form_data_type.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ class DataClassType extends AbstractType
3030
public function buildForm(FormBuilderInterface $builder, array $options): void
3131
{
3232
assertType('GenericFormDataType\DataClass|null', $builder->getData());
33+
assertType('GenericFormDataType\DataClass|null', $builder->getForm()->getData());
3334

3435
$builder
3536
->add('foo', NumberType::class)

0 commit comments

Comments
 (0)