Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
5 / 5
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
Healthcheck
100.00% covered (success)
100.00%
5 / 5
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 __invoke
100.00% covered (success)
100.00%
5 / 5
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3/**
4 * @package Zmsadmin
5 * @copyright BerlinOnline Stadtportal GmbH & Co. KG
6 **/
7
8namespace BO\Zmsadmin;
9
10use BO\Slim\Render;
11use BO\Zmsentities\Schema\Entity;
12
13/**
14  * Handle requests concerning services
15  *
16  */
17class Healthcheck extends BaseController
18{
19    /**
20     * @SuppressWarnings(UnusedFormalParameter)
21     */
22    #[\Override]
23    public function __invoke(
24        \Psr\Http\Message\RequestInterface $request,
25        \Psr\Http\Message\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        $response = \BO\Slim\Render::withLastModified($response, time(), '0');
32        return $response;
33    }
34}