1 | <?php |
||
17 | class IncidentController extends Controller |
||
18 | { |
||
19 | /** |
||
20 | * @var Serializer; |
||
21 | */ |
||
22 | private $serializer; |
||
23 | |||
24 | /** |
||
25 | * Get an exist incident |
||
26 | * |
||
27 | * @Route("/{ident}") |
||
28 | * @Method({"GET"}) |
||
29 | * |
||
30 | * @param int $ident |
||
31 | * |
||
32 | * @return Response |
||
33 | */ |
||
34 | 2 | public function getAction($ident) |
|
53 | |||
54 | /** |
||
55 | * Updates an exist incident |
||
56 | * |
||
57 | * @Route("/{ident}") |
||
58 | * @Method({"POST"}) |
||
59 | * |
||
60 | * @param int $ident |
||
61 | * @param Request $request |
||
62 | * |
||
63 | * @return Response |
||
64 | */ |
||
65 | 2 | public function postAction($ident, Request $request) |
|
90 | |||
91 | /** |
||
92 | * Creates a new incident |
||
93 | * |
||
94 | * @Route("/") |
||
95 | * @Method({"PUT"}) |
||
96 | * |
||
97 | * @param Request $request |
||
98 | * |
||
99 | * @return Response |
||
100 | */ |
||
101 | 2 | public function putAction(Request $request) |
|
128 | |||
129 | /** |
||
130 | * Delete an exist incident |
||
131 | * |
||
132 | * @Route("/{ident}") |
||
133 | * @Method({"DELETE"}) |
||
134 | * |
||
135 | * @param int $ident |
||
136 | * |
||
137 | * @return Response |
||
138 | */ |
||
139 | 2 | public function deleteAction($ident) |
|
159 | |||
160 | /** |
||
161 | * @return Serializer |
||
162 | */ |
||
163 | public function getSerializer() |
||
167 | |||
168 | /** |
||
169 | * @param Serializer $serializer |
||
170 | */ |
||
171 | protected function setSerializer(Serializer $serializer) |
||
175 | |||
176 | /** |
||
177 | * @param string $ident |
||
178 | * @param array $errors |
||
179 | * |
||
180 | * @return Incident |
||
181 | */ |
||
182 | 6 | protected function getIncident($ident, &$errors) |
|
193 | |||
194 | /** |
||
195 | * @param array $errors |
||
196 | * |
||
197 | * @return \Closure |
||
198 | */ |
||
199 | protected function getErrorHandlerCallback(&$errors) |
||
205 | } |
||
206 |
This check looks at variables that are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.