Lines 75.00% 6 / 8
Methods 50.00% 2 / 4
Classes 0.00% 0 / 1
Name Lines Methods CRAP
 __invoke 0.00% 0 / 1 0.00% 0 / 1 2
 [BO\Slim\Controller] __construct 100.00% 1 / 1 100.00% 1 / 1 1
 [BO\Slim\Controller] prepareRequest 80.00% 4 / 5 0.00% 0 / 1 3.07
 [BO\Slim\Controller] initRequest 100.00% 1 / 1 100.00% 1 / 1 1
8class ExceptionSimulate extends \BO\Slim\Controller
9{
10    #[\Override]
11    public function __invoke(RequestInterface $request, ResponseInterface $response, array $args)
12    {
13        throw new \Exception("Unexpected exception simulation");
14    }
15}

Inherited from BO\Slim\Controller

33    public function __construct(ContainerInterface $containerInterface)
34    {
35        $this->containerInterface = $containerInterface;
36    }
68    public static function prepareRequest(RequestInterface $request): RequestInterface
69    {
70        /** @psalm-suppress RedundantCondition Module App subclasses may set MULTILANGUAGE to false. */
71        \App::$language = (\App::MULTILANGUAGE) ?
72            new \BO\Slim\Language($request, \App::$supportedLanguages) :
73            new \BO\Slim\Language($request, array_slice(\App::$supportedLanguages, 0));
74        \App::$now = (\App::$now instanceof \DateTimeInterface) ? \App::$now : new \DateTimeImmutable();
75        return $request;
76    }
78    public function initRequest(RequestInterface $request): RequestInterface
79    {
80        return self::prepareRequest($request);
81    }