Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | public function __call(string $name, array $parameters): string |
||
23 | { |
||
24 | $translation = Lang::get(sprintf('enums.%s.%s.%s', static::class, $this->name, $name), ...$parameters); |
||
|
|||
25 | |||
26 | if ($translation === $name) { |
||
27 | throw new ValueError(sprintf('"%s" is not a valid key for enum "%s"', $name, static::class)); |
||
28 | } |
||
29 | |||
30 | return $translation; |
||
31 | } |
||
33 |