| Conditions | 1 |
| Paths | 1 |
| Total Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | function renderContextCompose(callable $render_context_factory, $var_name) { |
||
| 9 | return function(Plates\Template $template) use ($render_context_factory, $var_name) { |
||
| 10 | 24 | $render_context = $render_context_factory($template->reference); |
|
| 11 | 24 | return $template->withAddedData([ |
|
| 12 | 24 | $var_name => $render_context, |
|
| 13 | 24 | ])->with('render_context', $render_context); |
|
| 14 | 24 | }; |
|
| 15 | } |
||
| 16 | |||
| 24 |
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.