| 1 | <?php |
||
| 5 | trait ParamHelpers { |
||
| 6 | |||
| 7 | /** |
||
| 8 | * Create proper arrays from dot-noted parameter names |
||
| 9 | * |
||
| 10 | * @param array $params |
||
| 11 | * @return array |
||
| 12 | */ |
||
| 13 | protected function cleanParams(array $params) |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Converts dot notation names to arrays and sets the value at the right depth |
||
| 24 | * |
||
| 25 | * @param string $name |
||
| 26 | * @param mixed $value |
||
| 27 | * @param array $values The array that holds the result |
||
| 28 | * @return void |
||
| 29 | */ |
||
| 30 | protected function cleanValueFrom($name, $value, array &$values = []) |
||
| 37 | } |
||
| 38 |
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.