RouteNotFoundException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Hyde\Framework\Exceptions;
6
7
use Exception;
8
9
use function sprintf;
10
11
class RouteNotFoundException extends Exception
12
{
13
    /** @var string */
14
    protected $message = 'Route not found.';
15
16
    /** @var int */
17
    protected $code = 404;
18
19
    public function __construct(?string $routeKey = null)
20
    {
21
        parent::__construct($routeKey ? sprintf('Route [%s] not found.', $routeKey) : $this->message);
22
    }
23
}
24