| Total Complexity | 9 |
| Total Lines | 66 |
| Duplicated Lines | 0 % |
| Coverage | 88.24% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class RetryTransportWrapper extends AbstractTransport |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @const string |
||
| 12 | */ |
||
| 13 | const NO_RESPONSE = "Graylog-Server didn't answer properly, expected 'HTTP/1.x 202 Accepted', response is ''"; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var HttpTransport |
||
| 17 | */ |
||
| 18 | protected $transport; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var int |
||
| 22 | */ |
||
| 23 | protected $maxRetries; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @var callable|null |
||
| 27 | */ |
||
| 28 | protected $exceptionMatcher; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * KeepAliveRetryTransportWrapper constructor. |
||
| 32 | * |
||
| 33 | * @param TransportInterface $transport |
||
| 34 | * @param int $maxRetries |
||
| 35 | * @param callable|null $exceptionMatcher |
||
| 36 | */ |
||
| 37 | 3 | public function __construct(TransportInterface $transport, $maxRetries, $exceptionMatcher = null) |
|
| 42 | 3 | } |
|
| 43 | |||
| 44 | /** |
||
| 45 | * @return TransportInterface |
||
| 46 | */ |
||
| 47 | public function getTransport() |
||
| 50 | } |
||
| 51 | |||
| 52 | /** |
||
| 53 | * Sends a Message over this transport. |
||
| 54 | * |
||
| 55 | * @param Message $message |
||
| 56 | * |
||
| 57 | * @return int calls function to send message |
||
| 58 | */ |
||
| 59 | 3 | public function send(Message $message) |
|
| 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.