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