Total Complexity | 5 |
Total Lines | 36 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | class Integer extends ValueObject |
||
19 | { |
||
20 | /** |
||
21 | * @param mixed $value |
||
22 | * @param mixed ...$other |
||
23 | * @throws \ReflectionException |
||
24 | */ |
||
25 | 7 | public function guard($value, ...$other): void |
|
30 | } |
||
31 | 6 | } |
|
32 | |||
33 | /** |
||
34 | * @param bool $bool |
||
35 | * @return Integer |
||
36 | * @throws \ReflectionException |
||
37 | */ |
||
38 | 1 | public static function createFromBool(bool $bool): self |
|
39 | { |
||
40 | 1 | return new static((int)$bool); |
|
|
|||
41 | } |
||
42 | |||
43 | /** |
||
44 | * @param string $string |
||
45 | * @return Integer |
||
46 | * @throws \ReflectionException |
||
47 | */ |
||
48 | 6 | public static function createFromString(string $string): self |
|
54 | } |
||
55 | } |
||
56 |