1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

Fix function casing when checking regular functions

This commit is contained in:
Matthew Brown 2016-12-10 13:20:41 -05:00
parent 0b06b3b09b
commit 12b5097fba

View File

@ -568,7 +568,10 @@ abstract class FunctionLikeChecker extends SourceChecker implements StatementsSo
}
$method_id = (string)$this->getMethodId();
$cased_method_id = $this instanceof MethodChecker ? MethodChecker::getCasedMethodId($method_id) : $method_id;
$cased_method_id = $this instanceof MethodChecker
? MethodChecker::getCasedMethodId($method_id)
: ($this instanceof FunctionChecker ? $this->function->name : null);
if (!$return_type_location) {
$return_type_location = new CodeLocation($this, $this->function, true);