RouteMatch   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
eloc 10
c 1
b 0
f 0
dl 0
loc 41
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getAction() 0 3 1
A getRouteName() 0 3 1
A __construct() 0 5 1
A getParams() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Furious\Router\Match;
6
7
final class RouteMatch
8
{
9
    private string $routeName;
10
    private string $action;
11
    private array $params;
12
13
    /**
14
     * RouteMatch constructor.
15
     * @param string $routeName
16
     * @param string $action
17
     * @param array $params
18
     */
19
    public function __construct(string $routeName, string $action, array $params)
20
    {
21
        $this->routeName = $routeName;
22
        $this->action = $action;
23
        $this->params = $params;
24
    }
25
26
    /**
27
     * @return string
28
     */
29
    public function getRouteName(): string
30
    {
31
        return $this->routeName;
32
    }
33
34
    /**
35
     * @return string
36
     */
37
    public function getAction(): string
38
    {
39
        return $this->action;
40
    }
41
42
    /**
43
     * @return array
44
     */
45
    public function getParams(): array
46
    {
47
        return $this->params;
48
    }
49
}