| Conditions | 2 |
| Paths | 2 |
| Total Lines | 21 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | public function __invoke(RequestInterface $request, array $options = []) |
||
| 18 | { |
||
| 19 | $requestId = Uuid::uuid4()->toString(); |
||
| 20 | if (isset($options['request-id'])) { |
||
| 21 | $requestId = $options['request-id']; |
||
| 22 | } |
||
| 23 | |||
| 24 | $headers = $request->getHeaders(); |
||
| 25 | $headers['X-Bunq-Client-Request-Id'][] = $requestId; |
||
| 26 | $headers['Cache-Control'][] = 'no-cache'; |
||
| 27 | $headers['X-Bunq-Geolocation'][] = '52.3 4.89 12 100 NL'; |
||
| 28 | $headers['X-Bunq-Language'][] = 'nl_NL'; |
||
| 29 | $headers['X-Bunq-Region'][] = 'nl_NL'; |
||
| 30 | |||
| 31 | return new Request( |
||
| 32 | $request->getMethod(), |
||
| 33 | $request->getUri(), |
||
| 34 | $headers, |
||
| 35 | $request->getBody() |
||
| 36 | ); |
||
| 37 | } |
||
| 38 | } |
||
| 39 |