UnableToFoundRouteException   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 9
c 1
b 0
f 0
dl 0
loc 21
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 3 1
A getParams() 0 3 1
A __construct() 0 6 1
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
}