| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 2.032 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 23 | 196 | public function start(Container $container, HttpBootloader $http, BroadcastConfig $config): void |
|
| 24 | { |
||
| 25 | 196 | $container->bindSingleton(AuthorizationMiddleware::class, static fn(BroadcastInterface $broadcast, ResponseFactoryInterface $responseFactory, BroadcastConfig $config): AuthorizationMiddleware => new AuthorizationMiddleware( |
|
| 26 | $broadcast, |
||
| 27 | $responseFactory, |
||
| 28 | $config->getAuthorizationPath() |
||
| 29 | )); |
||
| 30 | |||
| 31 | |||
| 32 | 196 | if ($config->getAuthorizationPath() !== null) { |
|
| 33 | 1 | $http->addMiddleware(AuthorizationMiddleware::class); |
|
| 34 | } |
||
| 37 |