Completed
Push — master ( b3457c...c694d9 )
by Phil
02:30
created

RouteConditionHandlerTrait::getPort()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php declare(strict_types=1);
2
3
namespace League\Route;
4
5
trait RouteConditionHandlerTrait
6
{
7
    /**
8
     * @var string|null
9
     */
10
    protected $host;
11
12
    /**
13
     * @var string|null
14
     */
15
    protected $name;
16
17
    /**
18
     * @var string|null
19
     */
20
    protected $scheme;
21
22
    /**
23
     * @var int|null
24
     */
25
    protected $port;
26
27
    /**
28
     * {@inheritdoc}
29
     */
30 30
    public function getHost() : ?string
31
    {
32 30
        return $this->host;
33
    }
34
35
    /**
36
     * {@inheritdoc}
37
     */
38 6
    public function setHost(string $host) : RouteConditionHandlerInterface
39
    {
40 6
        $this->host = $host;
41
42 6
        return $this;
43
    }
44
45
    /**
46
     * {@inheritdoc}
47
     */
48 30
    public function getName() : ?string
49
    {
50 30
        return $this->name;
51
    }
52
53
    /**
54
     * {@inheritdoc}
55
     */
56 4
    public function setName(string $name) : RouteConditionHandlerInterface
57
    {
58 4
        $this->name = $name;
59
60 4
        return $this;
61
    }
62
63
    /**
64
     * {@inheritdoc}
65
     */
66 32
    public function getScheme() : ?string
67
    {
68 32
        return $this->scheme;
69
    }
70
71
    /**
72
     * {@inheritdoc}
73
     */
74 6
    public function setScheme(string $scheme) : RouteConditionHandlerInterface
75
    {
76 6
        $this->scheme = $scheme;
77
78 6
        return $this;
79
    }
80
81
    /**
82
     * {@inheritdoc}
83
     */
84 28
    public function getPort() : ?int
85
    {
86 28
        return $this->port;
87
    }
88
89
    /**
90
     * {@inheritdoc}
91
     */
92 6
    public function setPort(int $port) : RouteConditionHandlerInterface
93
    {
94 6
        $this->port = $port;
95
96 6
        return $this;
97
    }
98
}
99