Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
24 | public function __get($name) { |
||
25 | if (!$this->func_stack) { |
||
26 | throw new BadMethodCallException('Cannot access ' . $name . ' because no func stack has been setup.'); |
||
27 | } |
||
28 | |||
29 | $func_stack = $this->func_stack; |
||
|
|||
30 | return $prop_stack(new RenderContext\FuncArgs( |
||
31 | $this->render, |
||
32 | $this->template, |
||
33 | $name |
||
34 | )); |
||
35 | } |
||
36 | |||
81 |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVar
assignment in line 1 and the$higher
assignment in line 2 are dead. The first because$myVar
is never used and the second because$higher
is always overwritten for every possible time line.