Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php namespace Magestead\Helper; |
||
35 | protected function getConfigFile(OutputInterface $output) |
||
36 | { |
||
37 | $config = new Parser(); |
||
38 | try { |
||
39 | return $config->parse($this->readConfigFile()); |
||
40 | } catch (ParseException $e) { |
||
41 | $output->writeln('<error>Unable to parse the config file</error>'); |
||
42 | } |
||
43 | |||
44 | return false; |
||
45 | } |
||
46 | |||
60 |
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: