Total Complexity | 10 |
Total Lines | 81 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | class Option |
||
19 | { |
||
20 | /** |
||
21 | * @var string|null |
||
22 | */ |
||
23 | protected $name = null; |
||
24 | /** |
||
25 | * @var string|null |
||
26 | */ |
||
27 | protected $value = null; |
||
28 | |||
29 | /** |
||
30 | * Option constructor. |
||
31 | * @param string|null $name |
||
32 | * @param string|null $value |
||
33 | */ |
||
34 | public function __construct(?string $name = null, ?string $value = null) |
||
35 | { |
||
36 | $this->name = $name; |
||
37 | $this->value = $value; |
||
38 | } |
||
39 | |||
40 | /** |
||
41 | * @return string|null |
||
42 | */ |
||
43 | public function getName(): ?string |
||
44 | { |
||
45 | return $this->name; |
||
46 | } |
||
47 | |||
48 | /** |
||
49 | * @param string|null $name |
||
50 | */ |
||
51 | public function setName(?string $name): void |
||
52 | { |
||
53 | $this->name = $name; |
||
54 | } |
||
55 | |||
56 | /** |
||
57 | * @return string|null |
||
58 | */ |
||
59 | public function getValue(): ?string |
||
62 | } |
||
63 | |||
64 | /** |
||
65 | * @param string|null $value |
||
66 | */ |
||
67 | public function setValue(?string $value): void |
||
70 | } |
||
71 | |||
72 | /** |
||
73 | * @return string |
||
74 | */ |
||
75 | public function __toString() |
||
78 | } |
||
79 | |||
80 | /** |
||
81 | * Converts the option to string |
||
82 | * @return string |
||
83 | */ |
||
84 | public function toString(): string |
||
87 | } |
||
88 | |||
89 | /** |
||
90 | * @param Option|null $other |
||
91 | * @return bool |
||
92 | */ |
||
93 | public function equals(?Option $other) |
||
101 | } |