RouteNotFoundException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Thruster\Component\HttpRouter\Exception;
4
5
use Psr\Http\Message\RequestInterface;
6
7
/**
8
 * Class RouteNotFoundException
9
 *
10
 * @package Thruster\Component\HttpRouter\Exception
11
 * @author  Aurimas Niekis <[email protected]>
12
 */
13
class RouteNotFoundException extends \Exception
14
{
15
    /**
16
     * @var RequestInterface
17
     */
18
    protected $request;
19
20 3
    public function __construct(RequestInterface $request)
21
    {
22 3
        $this->request = $request;
23 3
    }
24
25
    /**
26
     * @return RequestInterface
27
     */
28 1
    public function getRequest() : RequestInterface
29
    {
30 1
        return $this->request;
31
    }
32
}
33