Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
27 | 6 | protected function doHealthCheck(HealthBuilder $builder) |
|
28 | { |
||
29 | /** @var Response $response */ |
||
30 | 6 | $response = $this->request |
|
31 | 6 | ->send(); |
|
32 | |||
33 | 6 | $builder->withDetail('statusCode', $response->getStatusCode()); |
|
34 | |||
35 | 6 | if (!$response->isSuccessful()) { |
|
36 | 3 | $builder->down() |
|
37 | 3 | ->withDetail('body', $response->getBody(true)); |
|
38 | 3 | return; |
|
39 | } |
||
40 | |||
41 | 3 | $builder->up(); |
|
42 | 3 | } |
|
43 | } |
||
44 |