Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | public function __construct(string $enum, mixed $value, string $method = null) |
||
11 | { |
||
12 | if ($value instanceof Meta) { |
||
13 | $method = $value::class; |
||
14 | $value = $value->value; |
||
15 | } |
||
16 | |||
17 | // Matches the error message of invalid Foo::BAR access |
||
18 | parent::__construct('Enum '.$enum.' does not have a case with a meta property "'. |
||
19 | $method.'" of value "'.$value.'"'); |
||
20 | } |
||
22 |