Total Complexity | 4 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | class StringRequired implements Type |
||
17 | { |
||
18 | /** |
||
19 | * @var string $value |
||
20 | */ |
||
21 | private $value; |
||
22 | |||
23 | /** |
||
24 | * Required constructor. |
||
25 | * @param string $text |
||
26 | * @throws EmptyRequiredValue |
||
27 | */ |
||
28 | public function __construct(string $text) |
||
29 | { |
||
30 | if (empty($text)) |
||
31 | throw new EmptyRequiredValue(); |
||
32 | |||
33 | $this->value = $text; |
||
34 | } |
||
35 | |||
36 | public function __toString(): string |
||
39 | } |
||
40 | |||
41 | public function getValue() |
||
44 | } |
||
45 | } |