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

Fix undefined var name

This commit is contained in:
Matthew Brown 2016-07-26 14:58:45 -04:00
parent 9718893232
commit c4a222171b

View File

@ -171,6 +171,10 @@ class ClassMethodChecker extends FunctionChecker
}
foreach ($declared_type->types as $key => $declared_atomic_type) {
if (!isset($inferred_type->types[$key])) {
continue;
}
$inferred_atomic_type = $inferred_type->types[$key];
if (!($declared_atomic_type instanceof Type\Generic)) {
@ -317,7 +321,7 @@ class ClassMethodChecker extends FunctionChecker
foreach ($docblock_info['params'] as $docblock_param) {
$docblock_param_name = $docblock_param['name'];
if (isset($method_param_names[$param_name])) {
if (isset($method_param_names[$docblock_param_name])) {
foreach (self::$_method_params[$method_id] as &$param_info) {
if ($param_info['name'] === $docblock_param_name) {
$docblock_param_type_string = $docblock_param['type'];