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.
The variable $prop_stack does not exist. Did you forget to declare it?
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.
Loading history...
31
$this->render,
32
$this->template,
33
$name
34
));
35
}
36
37
public function __set($name, $value) {
38
throw new BadMethodCallException('Cannot set ' . $name . ' on this render context.');
39
}
40
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
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
69
public static function factory($func_stack = null) {
70
return function(RenderTemplate $render, Template $template) use (
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.