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