| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | public function __invoke(RequestInterface $request) |
||
| 30 | { |
||
| 31 | $headers = $request->getHeaders(); |
||
| 32 | |||
| 33 | // Use the session token if not overridden with installation token |
||
| 34 | if (!isset($headers['X-Bunq-Client-Authentication'])) { |
||
| 35 | $headers['X-Bunq-Client-Authentication'] = (string)$this->sessionToken->toString(); |
||
| 36 | } |
||
| 37 | |||
| 38 | return new Request( |
||
| 39 | $request->getMethod(), |
||
| 40 | $request->getUri(), |
||
| 41 | $headers, |
||
| 42 | $request->getBody() |
||
| 43 | ); |
||
| 44 | } |
||
| 45 | } |
||
| 46 |