Conditions | 2 |
Paths | 2 |
Total Lines | 7 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
45 | protected function create($name, $config = []) |
||
46 | { |
||
47 | $driverMethod = 'create' . ucfirst($name) . 'Formatter'; |
||
48 | if (method_exists($this, $driverMethod)) { |
||
49 | return $this->{$driverMethod}($config); |
||
50 | } else { |
||
51 | throw new InvalidArgumentException("Driver [{$name}] is not supported."); |
||
52 | } |
||
65 |