| Conditions | 7 |
| Paths | 5 |
| Total Lines | 15 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 7 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 59 | 3 | public function send(Message $message) |
|
| 60 | { |
||
| 61 | 3 | $tries = 0; |
|
| 62 | |||
| 63 | 3 | while (true) { |
|
| 64 | try { |
||
| 65 | 3 | $tries++; |
|
| 66 | 3 | return $this->transport->send($message); |
|
| 67 | 3 | } catch (RuntimeException $e) { |
|
| 68 | 3 | if ($this->maxRetries !== 0 && $tries > $this->maxRetries) { |
|
| 69 | 2 | throw $e; |
|
| 70 | } |
||
| 71 | |||
| 72 | 3 | if ($this->exceptionMatcher && !call_user_func($this->exceptionMatcher, $e)) { |
|
| 73 | 1 | throw $e; |
|
| 74 | } |
||
| 79 |
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.