Total Complexity | 10 |
Total Lines | 76 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | trait RouteConditionHandlerTrait |
||
10 | { |
||
11 | /** |
||
12 | * @var ?string |
||
13 | */ |
||
14 | protected $host; |
||
15 | |||
16 | /** |
||
17 | * @var ?string |
||
18 | */ |
||
19 | protected $name; |
||
20 | |||
21 | /** |
||
22 | * @var ?int |
||
23 | */ |
||
24 | protected $port; |
||
25 | |||
26 | /** |
||
27 | * @var ?string |
||
28 | */ |
||
29 | 48 | protected $scheme; |
|
30 | |||
31 | 48 | public function getHost(): ?string |
|
32 | { |
||
33 | return $this->host; |
||
34 | 51 | } |
|
35 | |||
36 | 51 | public function getName(): ?string |
|
37 | { |
||
38 | return $this->name; |
||
39 | 45 | } |
|
40 | |||
41 | 45 | public function getPort(): ?int |
|
44 | 51 | } |
|
45 | |||
46 | 51 | public function getScheme(): ?string |
|
47 | { |
||
48 | return $this->scheme; |
||
49 | 9 | } |
|
50 | |||
51 | 9 | public function setHost(string $host): RouteConditionHandlerInterface |
|
52 | 9 | { |
|
53 | $this->host = $host; |
||
54 | return $this->checkAndReturnSelf(); |
||
55 | 6 | } |
|
56 | |||
57 | 6 | public function setName(string $name): RouteConditionHandlerInterface |
|
58 | 6 | { |
|
59 | $this->name = $name; |
||
60 | return $this->checkAndReturnSelf(); |
||
61 | 9 | } |
|
62 | |||
63 | 9 | public function setPort(int $port): RouteConditionHandlerInterface |
|
67 | 9 | } |
|
68 | |||
69 | 9 | public function setScheme(string $scheme): RouteConditionHandlerInterface |
|
70 | 9 | { |
|
71 | $this->scheme = $scheme; |
||
72 | return $this->checkAndReturnSelf(); |
||
73 | } |
||
74 | |||
75 | private function checkAndReturnSelf(): RouteConditionHandlerInterface |
||
85 | )); |
||
86 | } |
||
87 | } |
||
88 |