| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 41 | 17 | public function resolve(AbstractTestBagInterface $testBag, RouteContextInterface $routeContext) |
|
| 42 | { |
||
| 43 | 17 | if ($testBag instanceof TestBagInterface) { |
|
| 44 | 11 | return $testBag->getTests(); |
|
| 45 | 6 | } elseif ($testBag instanceof RequestDependentTestBagInterface) { |
|
| 46 | 5 | $requestContext = $this->requestContextFactory->createContext($routeContext); |
|
| 47 | |||
| 48 | 5 | return $testBag->getTests($requestContext); |
|
| 49 | } |
||
| 50 | |||
| 51 | 1 | throw new RuntimeException(sprintf('No resolver exists for test bag instance of "%s".', get_class($testBag))); |
|
| 52 | } |
||
| 54 |