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 * @package Zmsstatistic
5 * @copyright BerlinOnline Stadtportal GmbH & Co. KG
6 **/
7
8namespace BO\Zmsstatistic;
9
10use BO\Slim\Render;
11use BO\Zmsentities\Schema\Entity;
12use Psr\Http\Message\RequestInterface;
13use Psr\Http\Message\ResponseInterface;
14
15class Healthcheck extends BaseController
16{
17    protected $withAccess = false;
18
19    /**
20     * @SuppressWarnings(UnusedFormalParameter)
21     */
22    #[\Override]
23    public function readResponse(
24        RequestInterface $request,
25        ResponseInterface $response,
26        array $args
27    ) {
28        $response = \BO\Zmsclient\Status::testStatus($response, function (): Entity|false|null {
29            return \App::$http->readGetResult('/status/', ['includeProcessStats' => 0])->getEntity();
30        });
31
32        return Render::withLastModified($response, time(), '0');
33    }
34}