Skip to content

Commit e571356

Browse files
committed
Add stub for AbstractController::createForm()
1 parent ee88a01 commit e571356

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

extension.neon

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ parameters:
2727
- stubs/Psr/Cache/CacheException.stub
2828
- stubs/Psr/Cache/CacheItemInterface.stub
2929
- stubs/Psr/Cache/InvalidArgumentException.stub
30+
- stubs/Symfony/Bundle/FrameworkBundle/Controller/AbstractController.stub
3031
- stubs/Symfony/Bundle/FrameworkBundle/KernelBrowser.stub
3132
- stubs/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.stub
3233
- stubs/Symfony/Bundle/FrameworkBundle/Test/TestContainer.stub
@@ -103,6 +104,7 @@ parameters:
103104
- stubs/Symfony/Contracts/Cache/CacheInterface.stub
104105
- stubs/Symfony/Contracts/Cache/CallbackInterface.stub
105106
- stubs/Symfony/Contracts/Cache/ItemInterface.stub
107+
- stubs/Symfony/Contracts/Service/ServiceSubscriberInterface.stub
106108
- stubs/Twig/Node/Node.stub
107109

108110
parametersSchema:
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
namespace Symfony\Bundle\FrameworkBundle\Controller;
4+
5+
use Symfony\Component\Form\FormInterface;
6+
use Symfony\Component\Form\FormTypeInterface;
7+
use Symfony\Contracts\Service\ServiceSubscriberInterface;
8+
9+
abstract class AbstractController implements ServiceSubscriberInterface
10+
{
11+
/**
12+
* @template TFormType of FormTypeInterface<TData>
13+
* @template TData
14+
*
15+
* @param class-string<TFormType> $type
16+
* @param TData $data
17+
* @param array<string, mixed> $options
18+
*
19+
* @phpstan-return ($data is null ? FormInterface<null|TData> : FormInterface<TData>)
20+
*/
21+
protected function createForm(string $type, $data = null, array $options = []): FormInterface
22+
{
23+
}
24+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
namespace Symfony\Contracts\Service;
4+
5+
interface ServiceSubscriberInterface
6+
{
7+
}

0 commit comments

Comments
 (0)