NotFoundException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 16
ccs 6
cts 6
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getRequest() 0 4 1
1
<?php
2
3
namespace IdNet\InvokerRouterMiddleware\Exception;
4
5
use Exception;
6
use Psr\Http\Message\ServerRequestInterface;
7
8
class NotFoundException extends Exception
9
{
10
    /** @var ServerRequestInterface */
11
    protected $request;
12
13 2
    public function __construct(ServerRequestInterface $request, $code = 404)
14
    {
15 2
        $this->request = $request;
16 2
        parent::__construct("Not found", $code);
17 2
    }
18
19 1
    public function getRequest()
20
    {
21 1
        return $this->request;
22
    }
23
}
24