| Conditions | 1 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | public function sendRequest(RequestInterface $request): ResponseInterface |
||
| 20 | { |
||
| 21 | /** @psalm-var array{file: string, line: int} $callStack */ |
||
| 22 | $callStack = debug_backtrace()[0]; |
||
| 23 | |||
| 24 | $uniqueId = random_bytes(36); |
||
| 25 | $startTime = microtime(true); |
||
| 26 | $this->collector->collect($request, $startTime, $callStack['file'] . ':' . $callStack['line'], $uniqueId); |
||
|
|
|||
| 27 | |||
| 28 | $response = null; |
||
| 29 | try { |
||
| 30 | $response = $this->decorated->sendRequest($request); |
||
| 31 | } finally { |
||
| 32 | $endTime = microtime(true); |
||
| 33 | $this->collector->collectTotalTime($response, $endTime, $uniqueId); |
||
| 34 | } |
||
| 35 | |||
| 36 | return $response; |
||
| 37 | } |
||
| 39 |