Lines 100.00% 7 / 7
Methods 100.00% 2 / 2
Classes 100.00% 1 / 1
Name Lines Methods CRAP
 readResponse 100.00% 4 / 4 100.00% 1 / 1 1
 [BO\Zmsticketprinter\BaseController] __invoke 100.00% 3 / 3 100.00% 1 / 1 1
21class Healthcheck extends BaseController
22{
23    /**
24     * @SuppressWarnings(UnusedFormalParameter)
25     * @return ResponseInterface
26     */
27    #[\Override]
28    public function readResponse(
29        RequestInterface $request,
30        ResponseInterface $response,
31        array $args
32    ) {
33        $response = Status::testStatus($response, function (): Entity|false|null {
34            return \App::$http->readGetResult('/status/', ['includeProcessStats' => 0])->getEntity();
35        });
36
37        return Render::withLastModified($response, time(), '0');
38    }
39}

Inherited from BO\Zmsticketprinter\BaseController

21    public function __invoke(RequestInterface $request, ResponseInterface $response, array $args)
22    {
23        $request = $this->initRequest($request);
24        $noCacheResponse = \BO\Slim\Render::withLastModified($response, time(), '0');
25        return $this->readResponse($request, $noCacheResponse, $args);
26    }