1 | <?php |
||
8 | class Unauthorize implements Contracts\Output { |
||
9 | |||
10 | /** |
||
11 | * @param DeGraciaMathieu\Clike\Contracts\Command $command [description] |
||
12 | */ |
||
13 | 1 | public function __construct(Contracts\Command $command) |
|
17 | |||
18 | /** |
||
19 | * Return unauthorize command lines |
||
20 | * @return \DeGraciaMathieu\Clike\Contracts\Line[] |
||
21 | */ |
||
22 | 1 | public function get() :array |
|
30 | |||
31 | /** |
||
32 | * Return unauthorize lines |
||
33 | * @return string |
||
34 | */ |
||
35 | 1 | protected function getErrorLine() :string |
|
41 | } |
||
42 |
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: