Completed
Push — dev-master ( 3d2c20...b7e24f )
by Derek Stephen
08:18 queued 03:13
created

NotAllowedDecorator   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 14
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A process() 0 6 1
1
<?php
2
3
namespace Bone\Mvc\Router\Decorator;
4
5
use Bone\Mvc\View\ViewEngine;
6
use Psr\Http\Message\ResponseInterface;
7
use Psr\Http\Message\ServerRequestInterface;
8
use Psr\Http\Server\MiddlewareInterface;
9
use Psr\Http\Server\RequestHandlerInterface;
10
11
class NotAllowedDecorator extends NotFoundDecorator
12
{
13
    /**
14
     * @param ServerRequestInterface $request
15
     * @param RequestHandlerInterface $handler
16
     * @return ResponseInterface
17
     */
18
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
19
    {
20
        $this->setView('error/not-allowed');
21
22
        return parent::process($request, $handler);
23
    }
24
}