1 | <?php |
||
23 | trait MessageQueryTrait |
||
24 | { |
||
25 | use MutualQueryTrait; |
||
26 | |||
27 | /** |
||
28 | * Specify unread message. |
||
29 | * @return \static $this |
||
30 | */ |
||
31 | 2 | public function unread() |
|
36 | |||
37 | /** |
||
38 | * Specify read message. |
||
39 | * @return \static $this |
||
40 | */ |
||
41 | 2 | public function read() |
|
46 | |||
47 | /** |
||
48 | * Specify unreceived message. |
||
49 | * @return \static $this |
||
50 | */ |
||
51 | 2 | public function unreceived() |
|
56 | |||
57 | /** |
||
58 | * Specify received message. |
||
59 | * @return \static $this |
||
60 | */ |
||
61 | 2 | public function received() |
|
66 | } |
||
67 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: