| Total Complexity | 3 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class Message |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * Saved messages. |
||
| 9 | * |
||
| 10 | * @var array |
||
| 11 | */ |
||
| 12 | private $messages; |
||
| 13 | |||
| 14 | public function __construct() |
||
| 15 | { |
||
| 16 | $this->messages = collect(); |
||
|
|
|||
| 17 | } |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Add a message to the messages list. |
||
| 21 | * |
||
| 22 | * @param $message |
||
| 23 | */ |
||
| 24 | public function addMessage($message) |
||
| 29 | }); |
||
| 30 | }); |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Get the messages. |
||
| 35 | * |
||
| 36 | * @return array |
||
| 37 | */ |
||
| 38 | public function getMessages() |
||
| 43 |
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..