Completed
Push — master ( 81d0e7...438276 )
by Aurimas
03:48
created

RouteNotFoundException::getRequest()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
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 1
    public function __construct(RequestInterface $request)
21
    {
22 1
        $this->request = $request;
23 1
    }
24
25
    /**
26
     * @return RequestInterface
27
     */
28 1
    public function getRequest() : RequestInterface
29
    {
30 1
        return $this->request;
31
    }
32
}
33