Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
62 | private function getFormObject() |
||
63 | { |
||
64 | if (!isset($this->form->vars['data'])) { |
||
65 | throw new \RuntimeException(sprintf( |
||
66 | 'Expected "data" to be set on the form view. Actual view variables: "%s"', |
||
67 | implode('", "', array_keys($this->form->vars)) |
||
68 | )); |
||
69 | } |
||
70 | |||
71 | return $this->form->vars['data']; |
||
72 | } |
||
73 | } |
||
74 |
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.