Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
41 | public function __call($name, array $args) { |
||
42 | if (!$this->func_stack) { |
||
43 | throw new BadMethodCallException('Cannot call ' . $name . ' because no func stack has been setup.'); |
||
44 | } |
||
45 | |||
46 | $func_stack = $this->func_stack; |
||
47 | return $func_stack(new RenderContext\FuncArgs( |
||
48 | $this->render, |
||
49 | $this->template, |
||
50 | $name, |
||
51 | $args |
||
52 | )); |
||
53 | } |
||
54 | |||
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.