Conditions | 3 |
Paths | 3 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3.0261 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
23 | 24 | public function locate(Expectation $expectation): ExpectationToArrayConverter |
|
24 | { |
||
25 | 24 | switch ($expectation->getVersion()->asString()) { |
|
26 | 24 | case '1': |
|
27 | 9 | return $this->factoryV1->createExpectationToArrayConverter(); |
|
28 | 15 | case '2': |
|
29 | 15 | return $this->factoryV2->createExpectationToArrayConverter(); |
|
30 | } |
||
31 | throw new \Exception(sprintf('Unimplemented configuration version: %s', $expectation->getVersion()->asString())); |
||
32 | } |
||
34 |