Lines n/a 0 / 0
Methods n/a 0 / 0
Classes n/a 0 / 0
Name Lines Methods CRAP
 __invoke n/a 0 / 0 n/a 0 / 0 2
9class TransactionMiddleware
10{
11    /**
12     * @codeCoverageIgnore
13     *
14     */
15    public function __invoke(ServerRequestInterface $request, RequestHandlerInterface $next)
16    {
17        Select::setTransaction();
18        try {
19            $response = $next->handle($request);
20        } catch (\Exception $exception) {
21            Select::writeRollback();
22            throw $exception;
23        }
24        Select::writeCommit();
25
26        return $response;
27    }
28}