| 1 | <?php |
||
| 11 | trait FullyNotifiableTrait |
||
| 12 | { |
||
| 13 | protected $email; |
||
| 14 | protected $slackWebhook; |
||
| 15 | protected $number; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * From EmailableInterface |
||
| 19 | * |
||
| 20 | * @return string |
||
| 21 | */ |
||
| 22 | public function getEmail() |
||
| 26 | |||
| 27 | /** |
||
| 28 | * From SlackableInterface |
||
| 29 | * |
||
| 30 | * @return string |
||
| 31 | */ |
||
| 32 | public function getSlackWebhook() |
||
| 36 | |||
| 37 | /** |
||
| 38 | * From TextableInterface |
||
| 39 | * |
||
| 40 | * @return string |
||
| 41 | */ |
||
| 42 | public function getNumber() |
||
| 46 | |||
| 47 | /** |
||
| 48 | * From PusherableInterface |
||
| 49 | * |
||
| 50 | * @return string |
||
| 51 | */ |
||
| 52 | public function getPusherChannelSuffix() |
||
| 56 | } |
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: