1 | <?php |
||
10 | class SyncerCommand |
||
11 | { |
||
12 | |||
13 | /** |
||
14 | * Creates a new instance of the SyncerCommand. |
||
15 | * @param FileCollector $fileCollector File Collector. |
||
16 | * @param EnvironmentFinder $envFinder Environment Variable Filder. |
||
17 | */ |
||
18 | public function __construct(FileCollector $fileCollector, EnvironmentFinder $envFinder) |
||
23 | |||
24 | /** |
||
25 | * Runs the command. |
||
26 | * Supressing this for now. |
||
27 | * @SuppressWarnings(PHPMD.NPathComplexity) |
||
28 | * @param array $arguments Command line arguments. |
||
29 | * @return void |
||
30 | */ |
||
31 | public function handle(array $arguments) |
||
71 | |||
72 | /** |
||
73 | * Looks through all the current env variables from all |
||
74 | * sources and makes a master list of all of them. |
||
75 | * @param array $currentEnvs Current Env Variables. |
||
76 | * @return array |
||
77 | */ |
||
78 | protected function getAllEnvs(array $currentEnvs) |
||
86 | |||
87 | /** |
||
88 | * Collects the command line arguments. |
||
89 | * @param array $arguments Command line arguments. |
||
90 | * @return void |
||
91 | */ |
||
92 | protected function handleArguments(array $arguments) |
||
101 | } |
||
102 |
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: