Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 5
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 1
TwigExceptionViewer
0.00% covered (danger)
0.00%
0 / 5
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 1
 __invoke
0.00% covered (danger)
0.00%
0 / 5
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace BO\Slim\Controller;
4
5use Psr\Http\Message\RequestInterface;
6use Psr\Http\Message\ResponseInterface;
7
8class TwigExceptionViewer extends \BO\Slim\Controller
9{
10    /**
11     * @SuppressWarnings(Superglobals)
12     */
13    public function __invoke(RequestInterface $request, ResponseInterface $response, array $args)
14    {
15        $request = $this->initRequest($request);
16        $exception = new \Exception($args['message']);
17        $exception->template = $args['template'];
18        $exception->data = $_REQUEST;
19        return \BO\Slim\TwigExceptionHandler::withHtml($request, $response, $exception);
20    }
21}