RouteMatch::getAction()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
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
}