Total Complexity | 4 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Coverage | 88.89% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | class StringType extends TypeValue implements Stringable |
||
13 | { |
||
14 | /** |
||
15 | * StringType constructor. |
||
16 | * |
||
17 | * @param string $value |
||
18 | */ |
||
19 | 13 | public function __construct(string $value) |
|
22 | 13 | } |
|
23 | |||
24 | /** |
||
25 | * {@inheritdoc} |
||
26 | */ |
||
27 | 1 | public function __toArray(): array |
|
28 | { |
||
29 | 1 | return (false === $split = str_split($this->value())) ? |
|
30 | [] : |
||
31 | 1 | $split; |
|
32 | } |
||
33 | |||
34 | /** |
||
35 | * {@inheritdoc} |
||
36 | */ |
||
37 | 1 | public function __toString(): string |
|
40 | } |
||
41 | } |
||
42 |