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

Treat self as absolute calss

This commit is contained in:
Matthew Brown 2016-05-09 15:58:48 -04:00
parent 734aee73a5
commit 1bd61e89af

View File

@ -348,8 +348,11 @@ class ClassMethodChecker extends FunctionChecker
else {
if ($param->type instanceof PhpParser\Node\Name\FullyQualified) {
$param_type = implode('\\', $param->type->parts);
}
else {
} elseif ($param->type->parts === ['self']) {
$param_type = $this->_absolute_class;
} else {
$param_type = ClassChecker::getAbsoluteClassFromString(implode('\\', $param->type->parts), $this->_namespace, $this->_aliased_classes);
}
}