GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Branch master (4044f6)
by Quim
01:59
created

Route::uri()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
namespace QuimCalpe\Router\Route;
3
4
class Route
5
{
6
    private $methods;
7
    private $uri;
8
    private $handler;
9
    private $name;
10
11
    /**
12
     * Creates a new Route.
13
     *
14
     * @param array|string $methods
15
     *      Either a single HTTP verb, or an array of verbs.
16
     * @param string $uri
17
     *      URI pattern to match for this route.
18
     * @param string $handler
19
     *      ClassName::methodName to invoke for this route. If methodName
20
     *      is not present, a method of 'index' is assumed.
21
     * @param string $name
22
     *      (Optional) An unique name for this route.
23
     */
24 20
    public function __construct($methods, $uri, $handler, $name = null)
25
    {
26 20
        $this->methods = (array)$methods;
27 20
        $this->uri = (string)$uri;
28 20
        $this->handler = (string)$handler;
29 20
        $this->name = $name;
30 20
    }
31
32
    /**
33
     * Get methods registered for this route.
34
     *
35
     * @return array
36
     */
37 9
    public function methods()
38
    {
39 9
        return $this->methods;
40
    }
41
42
    /**
43
     * Get the URI defined for this route.
44
     *
45
     * @return string
46
     */
47 9
    public function uri()
48
    {
49 9
        return $this->uri;
50
    }
51
52
    /**
53
     * Get the handler defined for this route.
54
     *
55
     * @return string
56
     */
57 9
    public function handler()
58
    {
59 9
        return $this->handler;
60
    }
61
62
    /**
63
     * Get the name defined for this route, or null if undefined.
64
     *
65
     * @return string|null
66
     */
67 9
    public function name()
68
    {
69 9
        return $this->name;
70
    }
71
}
72