| Conditions | 2 | 
| Paths | 2 | 
| Total Lines | 11 | 
| Code Lines | 6 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 7 | 
| CRAP Score | 2 | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php | ||
| 15 | 7 | public function __invoke(ContainerInterface $container): Publisher | |
| 16 |     { | ||
| 17 | 7 |         $mercureConfig = $container->get('config')['mercure'] ?? []; | |
| 18 | 7 | $mercureHub = $mercureConfig['internal_hub_url'] ?? $mercureConfig['public_hub_url'] ?? null; | |
| 19 | 7 |         if ($mercureHub === null) { | |
| 20 | 5 | throw MercureException::missingHubUrl(); | |
| 21 | } | ||
| 22 | |||
| 23 | 2 | $jwtProvider = $container->get(LcobucciJwtProvider::class); | |
| 24 | |||
| 25 | 2 |         return new Publisher(sprintf('%s/.well-known/mercure', $mercureHub), $jwtProvider); | |
| 26 | } | ||
| 28 |