Total Complexity | 6 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | final class InvalidArgument extends Exception |
||
8 | { |
||
9 | private function __construct(string $message = "", int $code = 0, \Throwable $previous = null) |
||
10 | { |
||
11 | parent::__construct( |
||
12 | $message, |
||
13 | $code, |
||
14 | $previous |
||
15 | ); |
||
16 | } |
||
17 | |||
18 | public static function invalidBooleanValue($value): self |
||
19 | { |
||
20 | return new static(var_export($value, true) . ' is not boolish'); |
||
21 | } |
||
22 | |||
23 | public static function isEmpty(): self |
||
24 | { |
||
25 | return new static('Value cannot be empty'); |
||
26 | } |
||
27 | |||
28 | public static function invalidNumeric($value): self |
||
31 | } |
||
32 | |||
33 | public static function invalidObject($value): self |
||
34 | { |
||
35 | return new static(var_export($value, true) . ' is an valid object'); |
||
36 | } |
||
37 | |||
38 | public static function unserializableValue($value, \Throwable $previous = null): self |
||
41 | } |
||
42 | } |
||
43 |