| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 51 | private function loadConfigs($directory) |
||
| 52 | { |
||
| 53 | if (File::isDirectory($directory)) { |
||
| 54 | |||
| 55 | $files = File::allFiles($directory); |
||
| 56 | |||
| 57 | foreach ($files as $file) { |
||
| 58 | // build the key from the file name (just remove the .php extension from the file name) |
||
| 59 | $fileNameOnly = str_replace('.php', '', $file->getFilename()); |
||
| 60 | |||
| 61 | // merge the config file |
||
| 62 | $this->mergeConfigFrom($file->getPathname(), $fileNameOnly); |
||
| 63 | } |
||
| 64 | } |
||
| 65 | } |
||
| 66 | } |
||
| 67 |
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: