Conditions | 3 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
27 | public function createConverter($key, array $params = []) |
||
28 | { |
||
29 | switch (strtolower($key)) { |
||
30 | case 'image': |
||
31 | $converter = new Converter\ImageConverter($params); |
||
32 | break; |
||
33 | |||
34 | default: |
||
35 | throw new \Exception("Only image converter is supported"); |
||
36 | } |
||
37 | if ($this->cacheStorage !== null) { |
||
38 | $converter->setCache($this->cacheStorage); |
||
39 | } |
||
40 | return $converter; |
||
41 | } |
||
42 | |||
66 |