| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 46 | final public static function __callStatic(string $name, /** @scrutinizer ignore-unused */array $arguments) : self |
||
| 47 | { |
||
| 48 | $class = get_called_class(); |
||
| 49 | if (defined("{$class}::" . strtoupper($name))) { |
||
| 50 | return new static($name); |
||
| 51 | } |
||
| 52 | |||
| 53 | throw new \UnexpectedValueException("'{$name}' is not a valid {$class}"); |
||
| 54 | } |
||
| 55 | |||
| 74 |