Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
5 / 5 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
Healthcheck | |
100.00% |
5 / 5 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
__invoke | |
100.00% |
5 / 5 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | /** |
4 | * @package Zmsadmin |
5 | * @copyright BerlinOnline Stadtportal GmbH & Co. KG |
6 | **/ |
7 | |
8 | namespace BO\Zmsadmin; |
9 | |
10 | use BO\Slim\Render; |
11 | |
12 | /** |
13 | * Handle requests concerning services |
14 | * |
15 | */ |
16 | class Healthcheck extends BaseController |
17 | { |
18 | /** |
19 | * @SuppressWarnings(UnusedFormalParameter) |
20 | */ |
21 | public function __invoke( |
22 | \Psr\Http\Message\RequestInterface $request, |
23 | \Psr\Http\Message\ResponseInterface $response, |
24 | array $args |
25 | ) { |
26 | $response = \BO\Zmsclient\Status::testStatus($response, function () { |
27 | return \App::$http->readGetResult('/status/', ['includeProcessStats' => 0])->getEntity(); |
28 | }); |
29 | $response = \BO\Slim\Render::withLastModified($response, time(), '0'); |
30 | return $response; |
31 | } |
32 | } |