| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | public function __invoke(ContainerInterface $container): AccessLogger |
||
| 13 | { |
||
| 14 | $entityManager = $container->get('doctrine.entity_manager.orm_default') ?? null; |
||
| 15 | |||
| 16 | if ($entityManager === null) { |
||
| 17 | throw new ConfigException('EntityManager / doctrine.entity_manager.orm_default is not registered.'); |
||
| 18 | } |
||
| 19 | |||
| 20 | return new AccessLogger( |
||
| 21 | $entityManager |
||
| 22 | ); |
||
| 25 |