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; |
||
51 | protected function readConfigFile() |
||
52 | { |
||
53 | if (!file_exists($this->_projectPath . '/magestead.yaml')) { |
||
54 | throw new MissingConfigFileException('No config file was found, are you in the project root?'); |
||
55 | } |
||
56 | |||
57 | return file_get_contents($this->_projectPath . '/magestead.yaml'); |
||
58 | } |
||
59 | } |
||
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: