Skip to content

Commit 01b183a

Browse files
committed
Add annotation
1 parent f1cb9fa commit 01b183a

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php

+31-1
Original file line numberDiff line numberDiff line change
@@ -46,21 +46,33 @@
4646
*/
4747
trait ControllerTrait
4848
{
49+
/**
50+
* @required
51+
*/
4952
protected function getRouter(): RouterInterface
5053
{
5154
throw new \LogicException(sprintf('An instance of "%s" must be provided.', RouterInterface::class));
5255
}
5356

57+
/**
58+
* @required
59+
*/
5460
protected function getRequestStack(): RequestStack
5561
{
5662
throw new \LogicException(sprintf('An instance of "%s" must be provided.', RequestStack::class));
5763
}
5864

65+
/**
66+
* @required
67+
*/
5968
protected function getHttpKernel(): HttpKernelInterface
6069
{
6170
throw new \LogicException(sprintf('An instance of "%s" must be provided.', HttpKernelInterface::class));
6271
}
6372

73+
/**
74+
* @required
75+
*/
6476
protected function getSerializer(): SerializerInterface
6577
{
6678
throw new \LogicException(sprintf('An instance of "%s" must be provided.', SerializerInterface::class));
@@ -70,38 +82,56 @@ protected function getSerializer(): SerializerInterface
7082
* An instance of the Session implementation (and not the interface) is returned because getFlashBag is not part of
7183
* the interface.
7284
*
73-
* @return Session
85+
* @required
7486
*/
7587
protected function getSession(): Session
7688
{
7789
throw new \LogicException(sprintf('An instance of "%s" must be provided.', Session::class));
7890
}
7991

92+
/**
93+
* @required
94+
*/
8095
protected function getAuthorizationChecker(): AuthorizationCheckerInterface
8196
{
8297
throw new \LogicException(sprintf('An instance of "%s" must be provided.', AuthorizationCheckerInterface::class));
8398
}
8499

100+
/**
101+
* @required
102+
*/
85103
protected function getTwig(): \Twig_Environment
86104
{
87105
throw new \LogicException(sprintf('An instance of "%s" must be provided.', \Twig_Environment::class));
88106
}
89107

108+
/**
109+
* @required
110+
*/
90111
protected function getDoctrine(): ManagerRegistry
91112
{
92113
throw new \LogicException(sprintf('An instance of "%s" must be provided.', ManagerRegistry::class));
93114
}
94115

116+
/**
117+
* @required
118+
*/
95119
protected function getFormFactory(): FormFactoryInterface
96120
{
97121
throw new \LogicException(sprintf('An instance of "%s" must be provided.', FormFactoryInterface::class));
98122
}
99123

124+
/**
125+
* @required
126+
*/
100127
protected function getTokenStorage(): TokenStorageInterface
101128
{
102129
throw new \LogicException(sprintf('An instance of "%s" must be provided.', TokenStorageInterface::class));
103130
}
104131

132+
/**
133+
* @required
134+
*/
105135
protected function getCsrfTokenManager(): CsrfTokenManagerInterface
106136
{
107137
throw new \LogicException(sprintf('An instance of "%s" must be provided.', CsrfTokenManagerInterface::class));

0 commit comments

Comments
 (0)