UnableToFoundRouteException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 6
rs 10
cc 1
nc 1
nop 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Furious\Router\Exception;
6
7
use LogicException;
8
9
class UnableToFoundRouteException extends LogicException
10
{
11
    private string $name;
12
    private array $params;
13
14
    public function __construct($name, array $params = [])
15
    {
16
        parent::__construct();
17
        $this->message = 'Route "' . $name . '" not found.';
18
        $this->name = $name;
19
        $this->params = $params;
20
    }
21
22
    public function getName(): string
23
    {
24
        return $this->name;
25
    }
26
27
    public function getParams(): array
28
    {
29
        return $this->params;
30
    }
31
}