| 1 | <?php |
||
| 9 | class ConsoleKernel |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * Get all user defined commands. |
||
| 13 | * |
||
| 14 | * @return array |
||
| 15 | */ |
||
| 16 | public function getCommands() |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Verify user defined commands. |
||
| 29 | * |
||
| 30 | * @param string $command |
||
| 31 | * |
||
| 32 | * @throws FileNotFound|InvalidCommand |
||
| 33 | */ |
||
| 34 | protected function verifyCommand($command) |
||
| 46 | } |
||
| 47 |
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: