| Conditions | 2 |
| Paths | 2 |
| Total Lines | 24 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | public function createService(ServiceLocatorInterface $serviceLocator) |
||
| 24 | { |
||
| 25 | $controller = new IndexController(); |
||
| 26 | $serviceLocator = $this->transformIntoServiceManager($serviceLocator); |
||
| 27 | |||
| 28 | /** @var array|\Zend\Config\Config $configuration */ |
||
| 29 | $configuration = $serviceLocator->get('Config'); |
||
| 30 | $key = 'net_bazzline_zf_locator_generator'; |
||
| 31 | |||
| 32 | if (!isset($configuration[$key])) { |
||
| 33 | throw new InvalidArgumentException ( |
||
| 34 | 'expected configuration key "' . $key . '" not found' |
||
| 35 | ); |
||
| 36 | } |
||
| 37 | |||
| 38 | $configuration = $configuration[$key]; |
||
| 39 | /** @var PipeInterface $pipe */ |
||
| 40 | $pipe = $serviceLocator->get('NetBazzlineLocatorGeneratorProcessPipe'); |
||
| 41 | |||
| 42 | $controller->setConfiguration($configuration); |
||
| 43 | $controller->setProcessPipe($pipe); |
||
| 44 | |||
| 45 | return $controller; |
||
| 46 | } |
||
| 47 | } |