| 1 | <?php |
||
| 7 | class Command implements Contracts\Output { |
||
| 8 | |||
| 9 | /** |
||
| 10 | * @param DeGraciaMathieu\Clike\Contracts\Command $command [description] |
||
| 11 | */ |
||
| 12 | 2 | public function __construct(Contracts\Command $command) |
|
| 16 | |||
| 17 | /** |
||
| 18 | * Return command lines |
||
| 19 | * @return \DeGraciaMathieu\Clike\Contracts\Line[] |
||
| 20 | */ |
||
| 21 | 2 | public function get() :array |
|
| 25 | } |
||
| 26 |
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: