| Conditions | 2 |
| Paths | 2 |
| Total Lines | 8 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php namespace Magestead\Helper; |
||
| 47 | protected function readConfigFile() |
||
| 48 | { |
||
| 49 | if (!file_exists($this->_projectPath . '/magestead.yaml')) { |
||
| 50 | throw new MissingConfigFileException('No config file was found, are you in the project root?'); |
||
| 51 | } |
||
| 52 | |||
| 53 | return file_get_contents($this->_projectPath . '/magestead.yaml'); |
||
| 54 | } |
||
| 55 | } |
||
| 56 |
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: