1 | <?php |
||
9 | class Generator |
||
10 | { |
||
11 | private $config; |
||
12 | |||
13 | private $fils; |
||
14 | |||
15 | private $useSortFixer; |
||
16 | |||
17 | 5 | public function __construct($config, Filesystem $files = null, UseSortFixer $useSortFixer = null) |
|
23 | |||
24 | 5 | public function generate($command, $name) |
|
36 | |||
37 | 5 | private function generateDependencies($name, $dependencies) |
|
57 | } |
||
58 |
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: