| Conditions | 7 |
| Paths | 33 |
| Total Lines | 24 |
| Code Lines | 14 |
| Lines | 3 |
| Ratio | 12.5 % |
| Tests | 5 |
| CRAP Score | 27.6718 |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Loads and cleans a config file. |
||
| 44 | * |
||
| 45 | * @param string $file a Configuration file |
||
| 46 | * |
||
| 47 | * @return array an array of the cleaned directives of a the config per entry |
||
| 48 | */ |
||
| 49 | 1 | public function getActiveConfig($file = '') |
|
| 50 | { |
||
| 51 | 1 | return $this->parser->setConfigFile($file)->getActiveConfig(); |
|
| 52 | } |
||
| 53 | } |
||
| 54 |
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: