Passed
Push — master ( 10fd01...6c0fb4 )
by Anatoly
01:35
created

PageNotFoundException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 11
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
1
<?php declare(strict_types=1);
2
3
/**
4
 * It's free open-source software released under the MIT License.
5
 *
6
 * @author Anatoly Fenric <[email protected]>
7
 * @copyright Copyright (c) 2018, Anatoly Fenric
8
 * @license https://github.com/sunrise-php/http-router/blob/master/LICENSE
9
 * @link https://github.com/sunrise-php/http-router
10
 */
11
12
namespace Sunrise\Http\Router\Exception;
13
14
/**
15
 * Import classes
16
 */
17
use Psr\Http\Message\ServerRequestInterface;
18
use Sunrise\Http\Message\ResponseFactory;
19
20
/**
21
 * PageNotFoundException
22
 */
23
class PageNotFoundException extends HttpException
24
{
25
26
	/**
27
	 * Constructor of the class
28
	 *
29
	 * @param ServerRequestInterface $request
30
	 */
31
	public function __construct(ServerRequestInterface $request)
32
	{
33
		parent::__construct($request, (new ResponseFactory)->createResponse(404));
34
	}
35
}
36