| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 51 | public function message($message) |
||
| 52 | { |
||
| 53 | if (!is_string($message)) { |
||
| 54 | throw new \Exception("Message text should be a string."); |
||
| 55 | } |
||
| 56 | if (trim($message) == '') { |
||
| 57 | throw new \Exception("Message text could not be empty."); |
||
| 58 | } |
||
| 59 | $this->body = $message; |
||
|
|
|||
| 60 | |||
| 61 | return $this; |
||
| 62 | } |
||
| 63 | |||
| 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..