Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
55 | public function __invoke(...$args) { |
||
56 | if (!$this->func_stack) { |
||
57 | throw new BadMethodCallException('Cannot invoke the render context because no func stack has been setup.'); |
||
58 | } |
||
59 | |||
60 | $func_stack = $this->func_stack; |
||
61 | return $func_stack(new RenderContext\FuncArgs( |
||
62 | $this->render, |
||
63 | $this->template, |
||
64 | '__invoke', |
||
65 | $args |
||
66 | )); |
||
67 | } |
||
68 | |||
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.