Passed
Pull Request — master (#59)
by
unknown
12:23
created

HttpNotFoundException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 4
1
<?php
2
3
namespace App\LazyRendering\Http;
4
5
use Psr\Http\Message\ServerRequestInterface;
6
use Throwable;
7
8
final class HttpNotFoundException extends \Exception
9
{
10
    private ServerRequestInterface $request;
11
12
    public function __construct(ServerRequestInterface $request, $message = "", $code = 0, Throwable $previous = null)
13
    {
14
        parent::__construct(
15
            $message,
16
            $code,
17
            $previous
18
        );
19
        $this->request = $request;
20
    }
21
22
    public function getRequest(): ServerRequestInterface
23
    {
24
        return $this->request;
25
    }
26
}
27