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