| 1 | <?php |
||
| 9 | trait ModuleCommandArguments |
||
| 10 | { |
||
| 11 | use CommandArguments; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * Get console command arguments. |
||
| 15 | * |
||
| 16 | * @return array |
||
| 17 | */ |
||
| 18 | protected function getArguments() |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Get console command arguments. |
||
| 27 | * |
||
| 28 | * @return array |
||
| 29 | */ |
||
| 30 | protected function getOptions() |
||
| 36 | } |
||
| 37 |
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: