| Total Complexity | 2 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | final class RequestNotFoundException extends RuntimeException |
||
| 18 | { |
||
| 19 | const MSG = 'A Request object for a request to %s could not be found'; |
||
| 20 | const CODE = 16; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var RequestInterface |
||
| 24 | */ |
||
| 25 | private $request; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * RequestNotFoundException constructor. |
||
| 29 | * |
||
| 30 | * @param RequestInterface $request The Request we can't find a timer for |
||
| 31 | */ |
||
| 32 | public function __construct(RequestInterface $request) |
||
| 33 | { |
||
| 34 | $this->request = $request; |
||
| 35 | |||
| 36 | parent::__construct( |
||
| 37 | sprintf(self::MSG, $request->getUri()), |
||
| 38 | self::CODE |
||
| 39 | ); |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @return \Psr\Http\Message\RequestInterface |
||
| 44 | */ |
||
| 45 | public function getRequest() |
||
| 48 | } |
||
| 49 | } |
||
| 50 |