Completed
Push — feature/fixing_cost ( f58af6...414fbf )
by Laurent
01:41
created

Route::getName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
4
namespace FlightLog\Infrastructure\Common\Routes;
5
6
7
use FlightLog\Http\Web\Controller\WebController;
8
9
final class Route
10
{
11
12
    /**
13
     * @var string
14
     */
15
    private $name;
16
17
    /**
18
     * @var string
19
     */
20
    private $controller;
21
22
    /**
23
     * @var string
24
     */
25
    private $method;
26
27
    /**
28
     * @param string $name
29
     * @param string $controller
30
     * @param string $method
31
     */
32
    public function __construct($name, $controller, $method)
33
    {
34
        $this->controller = $controller;
35
        $this->name = $name;
36
        $this->method = $method;
37
    }
38
39
    /**
40
     * @return string
41
     */
42
    public function getName()
43
    {
44
        return $this->name;
45
    }
46
47
    /**
48
     * @return string
49
     */
50
    public function getController()
51
    {
52
        return $this->controller;
53
    }
54
55
    /**
56
     * @return string
57
     */
58
    public function getMethod()
59
    {
60
        return $this->method;
61
    }
62
63
    /**
64
     * @param string $action
0 ignored issues
show
Bug introduced by
There is no parameter named $action. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
65
     *
66
     * @return bool
67
     */
68
    public function match($route){
69
        return $this->name === $route;
70
    }
71
72
}