1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

Fix static calls on class_aliased classes

This commit is contained in:
Matthew Brown 2018-12-21 11:39:28 -05:00
parent 947e3bf0f1
commit fab4d135b2
3 changed files with 7 additions and 0 deletions

View File

@ -315,6 +315,8 @@ class StaticCallAnalyzer extends \Psalm\Internal\Analyzer\Statements\Expression\
$fq_class_name = $lhs_type_part->value;
$fq_class_name = $codebase->classlikes->getUnAliasedName($fq_class_name);
$is_mock = ExpressionAnalyzer::isMock($fq_class_name);
$has_mock = $has_mock || $is_mock;

View File

@ -371,6 +371,9 @@ class StubTest extends TestCase
$d = new D();
D::bat();
$d::bat();
class E implements IAlias {}'
);

View File

@ -11,6 +11,8 @@ class A {
public function bar(string $s) : string {
return $s . " Im here";
}
public static function bat() : void {}
}
interface I {}