1 | <?php |
||
15 | class HealthCheckController |
||
16 | { |
||
17 | protected $runnerManager; |
||
18 | protected $pathHelper; |
||
19 | protected $template; |
||
20 | |||
21 | /** |
||
22 | * @var Psr\Log\LoggerInterface $log |
||
23 | */ |
||
24 | protected $log; |
||
25 | |||
26 | /** |
||
27 | * @param RunnerManager $runnerManager |
||
28 | * @param PathHelper $pathHelper |
||
29 | * @param $template |
||
30 | */ |
||
31 | public function __construct(RunnerManager $runnerManager, PathHelper $pathHelper, $template, LoggerInterface $log = null) |
||
41 | |||
42 | /** |
||
43 | * @param \Symfony\Component\HttpFoundation\Request $request |
||
44 | * |
||
45 | * @return \Symfony\Component\HttpFoundation\Response |
||
46 | */ |
||
47 | public function indexAction(Request $request) |
||
76 | |||
77 | /** |
||
78 | * @return \Symfony\Component\HttpFoundation\Response |
||
79 | */ |
||
80 | public function listAction(Request $request) |
||
92 | |||
93 | /** |
||
94 | * @return JsonResponse |
||
95 | */ |
||
96 | public function listAllAction() |
||
108 | |||
109 | /** |
||
110 | * @return JsonResponse |
||
111 | */ |
||
112 | public function listGroupsAction() |
||
118 | |||
119 | /** |
||
120 | * @param Request $request |
||
121 | * |
||
122 | * @return \Symfony\Component\HttpFoundation\Response |
||
123 | */ |
||
124 | public function runAllChecksAction(Request $request) |
||
133 | |||
134 | /** |
||
135 | * @param Request $request |
||
136 | * |
||
137 | * @return \Symfony\Component\HttpFoundation\Response |
||
138 | */ |
||
139 | public function runAllChecksHttpStatusAction(Request $request) |
||
148 | |||
149 | /** |
||
150 | * @param string $checkId |
||
151 | * @param Request $request |
||
152 | * |
||
153 | * @return \Symfony\Component\HttpFoundation\Response |
||
154 | */ |
||
155 | public function runSingleCheckHttpStatusAction($checkId, Request $request) |
||
164 | |||
165 | /** |
||
166 | * @param string $checkId |
||
167 | * @param Request $request |
||
168 | * |
||
169 | * @return \Symfony\Component\HttpFoundation\Response |
||
170 | */ |
||
171 | public function runSingleCheckAction($checkId, Request $request) |
||
177 | |||
178 | /** |
||
179 | * @param Request $request |
||
180 | * @param string|null $checkId |
||
181 | * |
||
182 | * @return ArrayReporter |
||
183 | */ |
||
184 | protected function runTests(Request $request, $checkId = null) |
||
203 | |||
204 | private function statusIsNotOK(array $resultItem) |
||
208 | |||
209 | /** |
||
210 | * Send results to the Log. |
||
211 | * |
||
212 | * @param boolean $isOK Did all the checks all returned OK? |
||
213 | * @param ArrayReporter $reporter Details of the tests |
||
214 | * |
||
215 | * @return void |
||
216 | */ |
||
217 | private function logTestStatus($isOK, ArrayReporter $reporter) |
||
228 | |||
229 | /** |
||
230 | * @param Request $request |
||
231 | * |
||
232 | * @return Runner |
||
233 | * |
||
234 | * @throws \Exception |
||
235 | */ |
||
236 | private function getRunner(Request $request) |
||
248 | |||
249 | /** |
||
250 | * @param Request $request |
||
251 | * |
||
252 | * @return string |
||
253 | */ |
||
254 | private function getGroup(Request $request) |
||
258 | } |
||
259 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..