RouteConditionHandlerTrait   A
last analyzed

Complexity

Total Complexity 8

Size/Duplication

Total Lines 94
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 8
lcom 0
cbo 0
dl 0
loc 94
ccs 20
cts 20
cp 1
rs 10
c 0
b 0
f 0

8 Methods

Rating   Name   Duplication   Size   Complexity  
A getHost() 0 4 1
A setHost() 0 6 1
A getName() 0 4 1
A setName() 0 6 1
A getScheme() 0 4 1
A setScheme() 0 6 1
A getPort() 0 4 1
A setPort() 0 6 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