| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | protected function config($string, $children = []) |
||
| 18 | { |
||
| 19 | if (is_null(config(Constants::CONFIG_PACKAGE_NAME))) { |
||
| 20 | throw new \Exception('Config not found'); |
||
| 21 | } |
||
| 22 | |||
| 23 | return config( |
||
| 24 | implode('.', array_merge([Constants::CONFIG_PACKAGE_NAME, $string], (array) $children)) |
||
| 25 | ); |
||
| 26 | } |
||
| 27 | |||
| 42 |
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: