| Conditions | 3 |
| Paths | 4 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 56 | public function onBefore(BeforeEvent $event) |
||
| 57 | { |
||
| 58 | $request = $event->getRequest(); |
||
| 59 | $options = $request->getConfig(); |
||
| 60 | |||
| 61 | $videoManagerId = isset($options['videoManagerId']) ? $options['videoManagerId'] : null; |
||
| 62 | $token = $this->tokenManager->getToken($videoManagerId); |
||
| 63 | |||
| 64 | if ($token !== null) { |
||
| 65 | $request->setHeader('Authorization', sprintf(self::AUTH_BEARER, $token)); |
||
| 66 | } |
||
| 67 | } |
||
| 68 | } |
||
| 69 |