Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
17 | public function make($type, $callback) |
||
18 | { |
||
19 | $availableTypes = array_keys($this->config['available_types']); |
||
20 | |||
21 | if (! in_array($type, $availableTypes)) { |
||
22 | throw new UnavailableTypeException; |
||
23 | } |
||
24 | |||
25 | $optionClass = $this->makeClass($type); |
||
26 | |||
27 | $builder = new Builder($optionClass); |
||
28 | |||
29 | return $builder->make($callback); |
||
30 | } |
||
31 | |||
43 |