Conditions | 4 |
Paths | 4 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 4.1755 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | 24 | public function locate(array $expectationArray): ArrayToExpectationConverter |
|
23 | { |
||
24 | 24 | if (isset($expectationArray['version'])) { |
|
25 | 15 | switch ($expectationArray['version']) { |
|
26 | 15 | case '1': |
|
27 | return $this->factoryV1->createArrayToExpectationConverter(); |
||
28 | 15 | case '2': |
|
29 | 15 | return $this->factoryV2->createArrayToExpectationConverter(); |
|
30 | } |
||
31 | throw new \Exception(sprintf('Unimplemented configuration version: %s', $expectationArray['version'])); |
||
32 | } |
||
33 | |||
34 | 9 | return $this->factoryV1->createArrayToExpectationConverter(); |
|
35 | } |
||
37 |