| Conditions | 2 |
| Paths | 4 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2.1481 |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 39 | 3 | protected function send(RequestInterface $request): ResponseInterface |
|
| 40 | { |
||
| 41 | 3 | $started = microtime(true); |
|
| 42 | |||
| 43 | try { |
||
| 44 | 3 | $this->fire(StartedEvent::class, [$request, $started]); |
|
| 45 | 3 | $response = $this->sender->send($request); |
|
| 46 | 3 | $this->fire(SuccessEvent::class, [$request, $response, $started, microtime(true)]); |
|
| 47 | |||
| 48 | 3 | return $response; |
|
| 49 | } catch (HttpException $e) { |
||
| 50 | $this->fire(FailureEvent::class, [$request, $e, $started, microtime(true)]); |
||
| 51 | |||
| 52 | throw $e; |
||
| 53 | } |
||
| 54 | } |
||
| 55 | } |
||
| 56 |