| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | public function __invoke(ContainerInterface $container, string $requestedName, array $options = null): Clock |
||
| 19 | { |
||
| 20 | $options = $options ?? $this->getServiceOptions($container, $requestedName, 'laminas_date_time'); |
||
| 21 | |||
| 22 | if (empty($options['factory'])) { |
||
| 23 | throw new ServiceNotCreatedException( |
||
| 24 | sprintf( |
||
| 25 | 'The required \'factory\' configuration option is missing for service \'%s\'', |
||
| 26 | $requestedName |
||
| 27 | ), |
||
| 28 | ); |
||
| 29 | } |
||
| 30 | |||
| 31 | return new Clock( |
||
| 32 | $this->getService($container, $options['factory'], $requestedName), |
||
| 33 | $options['date_time_zone'] ?? null |
||
| 34 | ); |
||
| 37 |