Conditions | 4 |
Paths | 4 |
Total Lines | 19 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 5.4042 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
40 | 47 | public function getJsonConverter($className) |
|
41 | { |
||
42 | switch ($className) { |
||
43 | 47 | case 'Puli\Manager\Api\Config\ConfigFile': |
|
44 | 46 | return $this->puli->getConfigFileConverter(); |
|
45 | |||
46 | case 'Puli\Manager\Api\Module\ModuleFile': |
||
47 | 14 | return $this->puli->getLegacyModuleFileConverter(); |
|
48 | |||
49 | case 'Puli\Manager\Api\Module\RootModuleFile': |
||
50 | 26 | return $this->puli->getLegacyRootModuleFileConverter(); |
|
51 | |||
52 | default: |
||
53 | throw new InvalidArgumentException(sprintf( |
||
54 | 'Could not find converter for class "%s".', |
||
55 | $className |
||
56 | )); |
||
57 | } |
||
58 | } |
||
59 | } |
||
60 |