This check looks for calls to methods that do not seem to exist on a given type.
It looks for the method on the type itself as well as in inherited classes or
implemented interfaces.
This is most likely a typographical error or the method has been renamed.
Loading history...
26
$this->variableTypes['this'] = $className;
27
}
28
$stmts = $node->getStmts();
29
if (!$stmts) {
30
return;
31
}
32
foreach ($stmts as $stmt) {
33
if (!($stmt instanceof Expression && $stmt->expr instanceof Assign)) {
34
continue;
35
}
36
$var = $stmt->expr->var;
37
$expr = $stmt->expr->expr;
38
if ($var instanceof Variable && $expr instanceof New_) {
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.