| Conditions | 6 |
| Paths | 5 |
| Total Lines | 15 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 6 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 35 | public function send(Message $message): int |
||
| 36 | { |
||
| 37 | 4 | $tries = 0; |
|
| 38 | |||
| 39 | 4 | while (true) { |
|
| 40 | 4 | try { |
|
| 41 | 4 | $tries++; |
|
| 42 | 4 | return $this->transport->send($message); |
|
| 43 | } catch (Throwable $e) { |
||
| 44 | if ($this->maxRetries !== 0 && $tries > $this->maxRetries) { |
||
| 45 | throw $e; |
||
| 46 | } |
||
| 47 | 1 | ||
| 48 | if (!call_user_func($this->exceptionMatcher, $e)) { |
||
| 49 | 1 | throw $e; |
|
| 50 | } |
||
| 55 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.