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