Conditions | 3 |
Paths | 2 |
Total Lines | 6 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
49 | 5 | public function handle(RequestInterface $request): RequestInterface |
|
50 | { |
||
51 | 5 | if ($this->token === '' || $this->key === '') { |
|
52 | 4 | throw new AuthorizationException('Could not create api token, missing or empty arguments'); |
|
53 | } |
||
54 | 1 | return $request->withHeader($this->key, $this->token); |
|
55 | } |
||
57 |