| Conditions | 3 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 28 | public function to($numbers) |
||
| 29 | { |
||
| 30 | $recipients = is_array($numbers) ? $numbers : [$numbers]; |
||
| 31 | $recipients = array_map(function($item) { |
||
| 32 | return trim($item); |
||
| 33 | }, array_merge($this->recipients, $recipients)); |
||
| 34 | |||
| 35 | $this->recipients = array_values(array_filter($recipients)); |
||
| 36 | |||
| 37 | if (count($this->recipients) < 1) { |
||
| 38 | throw new \Exception("Message recipient could not be empty."); |
||
| 39 | } |
||
| 40 | |||
| 41 | return $this; |
||
| 42 | } |
||
| 43 | |||
| 64 | } |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..