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

Fix style

This commit is contained in:
Brown 2019-11-08 12:49:53 -05:00
parent 1b6b8fdba3
commit 895737d8be
4 changed files with 4 additions and 4 deletions

View File

@ -1713,7 +1713,7 @@ class ClassAnalyzer extends ClassLikeAnalyzer
$template_params[] = new Type\Union([
new Type\Atomic\TTemplateParam(
$param_name,
reset($template_map)[0],
\reset($template_map)[0],
$key
)
]);

View File

@ -189,7 +189,7 @@ abstract class FunctionLikeAnalyzer extends SourceAnalyzer implements Statements
$template_params[] = new Type\Union([
new Type\Atomic\TTemplateParam(
$param_name,
reset($template_map)[0],
\reset($template_map)[0],
$key
)
]);

View File

@ -602,7 +602,6 @@ class ArrayAssignmentAnalyzer
// do nothing
}
}
}
return null;

View File

@ -1553,8 +1553,9 @@ class MethodCallAnalyzer extends \Psalm\Internal\Analyzer\Statements\Expression\
$e = $calling_class_storage->template_type_extends;
if ($lhs_type_part instanceof TGenericObject) {
if ($calling_class_storage->template_types && $class_storage === $calling_class_storage) {
if ($class_storage === $calling_class_storage && $calling_class_storage->template_types) {
$i = 0;
foreach ($calling_class_storage->template_types as $type_name => $_) {
if (isset($lhs_type_part->type_params[$i])) {
$class_template_params[$type_name][$calling_class_storage->name] = [