Skip to content

Commit 14fcc87

Browse files
authored
Added return type declaration rules for FormTypeInterface (#670)
1 parent 352a84c commit 14fcc87

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

config/sets/symfony/symfony6/symfony-return-types.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use PHPStan\Type\ObjectWithoutClassType;
1515
use PHPStan\Type\StringType;
1616
use PHPStan\Type\UnionType;
17+
use PHPStan\Type\VoidType;
1718
use Rector\Config\RectorConfig;
1819
use Rector\StaticTypeMapper\ValueObject\Type\SimpleStaticType;
1920
use Rector\TypeDeclaration\Rector\ClassMethod\AddReturnTypeDeclarationRector;
@@ -279,6 +280,8 @@
279280
new StringType()
280281
),
281282
new AddReturnTypeDeclaration('Symfony\Component\Form\FormTypeInterface', 'getParent', $nullableStringType),
283+
new AddReturnTypeDeclaration('Symfony\Component\Form\FormTypeInterface', 'buildForm', new VoidType()),
284+
new AddReturnTypeDeclaration('Symfony\Component\Form\FormTypeInterface', 'configureOptions', new VoidType()),
282285
new AddReturnTypeDeclaration(
283286
'Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface',
284287
'isOptional',

0 commit comments

Comments
 (0)