| Conditions | 3 |
| Paths | 4 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3.009 |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | 3 | public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null) |
|
| 26 | { |
||
| 27 | 3 | $options = $this->getOptions($container, 'authentication'); |
|
| 28 | 3 | assert($options instanceof Authentication); |
|
| 29 | |||
| 30 | 3 | $objectManager = $options->getObjectManager(); |
|
| 31 | 3 | if (is_string($objectManager)) { |
|
| 32 | $options->setObjectManager($container->get($objectManager)); |
||
| 33 | } |
||
| 34 | |||
| 35 | 3 | $storage = $options->getStorage(); |
|
| 36 | 3 | if (is_string($storage)) { |
|
| 37 | 3 | $options->setStorage($container->get($storage)); |
|
| 38 | } |
||
| 39 | |||
| 40 | 3 | return new ObjectRepository($options); |
|
| 41 | } |
||
| 42 | |||
| 58 |