| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | public function handle($key, $content) |
||
| 25 | { |
||
| 26 | if (str_contains($key, '.')) { |
||
| 27 | |||
| 28 | $path = explode('.', $key); |
||
| 29 | |||
| 30 | $result = []; |
||
| 31 | |||
| 32 | $this->dotNotationToArray($result, $path, $content); |
||
| 33 | |||
| 34 | return $this->render->handle($path[0], $result); |
||
| 35 | } |
||
| 36 | |||
| 37 | return $this->render->handle($key, $content); |
||
| 38 | } |
||
| 39 | |||
| 61 |
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: