| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 29 | public function __invoke( |
||
| 30 | ContainerInterface $container, |
||
| 31 | string $requestedName, |
||
| 32 | array $options = null |
||
| 33 | ): ObjectManagerOption { |
||
| 34 | try { |
||
| 35 | return new ObjectManagerOption( |
||
| 36 | 'object-manager', |
||
| 37 | null, |
||
| 38 | InputOption::VALUE_REQUIRED, |
||
| 39 | 'The object manager that should be used', |
||
| 40 | $this->defaultObjectManagerName |
||
| 41 | ); |
||
| 42 | } catch (\Exception $e) { |
||
| 43 | throw new ServiceNotCreatedException( |
||
| 44 | sprintf('Failed to create object manager options \'%s\': %s', $requestedName, $e->getMessage()), |
||
| 45 | $e->getCode(), |
||
| 46 | $e |
||
| 47 | ); |
||
| 51 |