Total Complexity | 2 |
Total Lines | 26 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
32 | class Name extends Text |
||
33 | { |
||
34 | /** |
||
35 | * Create a new instance of the value object. |
||
36 | * |
||
37 | * @param string|Stringable $value |
||
38 | */ |
||
39 | 9 | public function __construct(protected string|Stringable $value) |
|
40 | { |
||
41 | 9 | parent::__construct($this->value); |
|
42 | |||
43 | 7 | $this->sanitize(); |
|
44 | } |
||
45 | |||
46 | /** |
||
47 | * Sanitize the value. |
||
48 | * |
||
49 | * @return void |
||
50 | */ |
||
51 | 7 | protected function sanitize(): void |
|
58 | } |
||
59 | } |
||
60 |