Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
49 | private function get($name, array $arguments): FormatInterface |
||
50 | { |
||
51 | $class = 'Folk\\Formats\\'.ucfirst($name); |
||
52 | |||
53 | if (!class_exists($class)) { |
||
54 | throw new InvalidArgumentException("The format {$name} does not exists"); |
||
55 | } |
||
56 | |||
57 | return new $class($this, ...$arguments); |
||
58 | } |
||
59 | } |
||
60 |