| Conditions | 2 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 47 | public function __invoke(callable $handler) |
||
| 48 | { |
||
| 49 | return function ( |
||
| 50 | RequestInterface $request, |
||
| 51 | array $options |
||
| 52 | ) use ($handler) { |
||
| 53 | $videoManagerId = isset($options['videoManagerId']) ? $options['videoManagerId'] : null; |
||
| 54 | $token = $this->tokenManager->getToken($videoManagerId); |
||
| 55 | |||
| 56 | return $handler($request->withHeader( |
||
| 57 | 'Authorization', |
||
| 58 | sprintf(self::AUTH_BEARER, $token) |
||
| 59 | ), $options); |
||
| 60 | }; |
||
| 61 | } |
||
| 62 | } |
||
| 63 |