Skip to content
Permalink
Browse files

Check expressions in variable name static calls

  • Loading branch information...
muglug committed Jul 25, 2019
1 parent 2c89a97 commit 8cb5d012d9302388bb023806922b70af7e0c378f
@@ -996,6 +996,10 @@ function (Assertion $assertion) use ($found_generic_params) : Assertion {
}
}
} else {
if ($stmt->name instanceof PhpParser\Node\Expr) {
ExpressionAnalyzer::analyze($statements_analyzer, $stmt->name, $context);
}
if (!$context->ignore_variable_method) {
$codebase->analyzer->addMixedMemberName(
strtolower($fq_class_name) . '::',
@@ -1009,6 +1009,17 @@ function foo(array $b) : void {
$a["foo"] = 5;
}',
],
'usedAsMethodName' => [
'<?php
class A {
public static function foo() : void {}
}
function foo() : void {
$method = "foo";
A::$method();
}',
],
];
}

0 comments on commit 8cb5d01

Please sign in to comment.
You can’t perform that action at this time.