4646 */
4747trait ControllerTrait
4848{
49+ /**
50+ * @required
51+ */
4952protected function getRouter ():RouterInterface
5053 {
5154throw new \LogicException (sprintf ('An instance of "%s" must be provided. ' , RouterInterface::class));
5255 }
5356
57+ /**
58+ * @required
59+ */
5460protected function getRequestStack ():RequestStack
5561 {
5662throw new \LogicException (sprintf ('An instance of "%s" must be provided. ' , RequestStack::class));
5763 }
5864
65+ /**
66+ * @required
67+ */
5968protected function getHttpKernel ():HttpKernelInterface
6069 {
6170throw new \LogicException (sprintf ('An instance of "%s" must be provided. ' , HttpKernelInterface::class));
6271 }
6372
73+ /**
74+ * @required
75+ */
6476protected function getSerializer ():SerializerInterface
6577 {
6678throw 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 */
7587protected function getSession ():Session
7688 {
7789throw new \LogicException (sprintf ('An instance of "%s" must be provided. ' , Session::class));
7890 }
7991
92+ /**
93+ * @required
94+ */
8095protected function getAuthorizationChecker ():AuthorizationCheckerInterface
8196 {
8297throw new \LogicException (sprintf ('An instance of "%s" must be provided. ' , AuthorizationCheckerInterface::class));
8398 }
8499
100+ /**
101+ * @required
102+ */
85103protected function getTwig ():\Twig_Environment
86104 {
87105throw new \LogicException (sprintf ('An instance of "%s" must be provided. ' , \Twig_Environment::class));
88106 }
89107
108+ /**
109+ * @required
110+ */
90111protected function getDoctrine ():ManagerRegistry
91112 {
92113throw new \LogicException (sprintf ('An instance of "%s" must be provided. ' , ManagerRegistry::class));
93114 }
94115
116+ /**
117+ * @required
118+ */
95119protected function getFormFactory ():FormFactoryInterface
96120 {
97121throw new \LogicException (sprintf ('An instance of "%s" must be provided. ' , FormFactoryInterface::class));
98122 }
99123
124+ /**
125+ * @required
126+ */
100127protected function getTokenStorage ():TokenStorageInterface
101128 {
102129throw new \LogicException (sprintf ('An instance of "%s" must be provided. ' , TokenStorageInterface::class));
103130 }
104131
132+ /**
133+ * @required
134+ */
105135protected function getCsrfTokenManager ():CsrfTokenManagerInterface
106136 {
107137throw new \LogicException (sprintf ('An instance of "%s" must be provided. ' , CsrfTokenManagerInterface::class));