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