From 6ac29fc965decea19d4ae0f91a290ef6669f0b42 Mon Sep 17 00:00:00 2001 From: whsv26 Date: Tue, 14 Sep 2021 00:50:23 +0300 Subject: [PATCH] Fix code style. --- .../Internal/Type/Comparator/ObjectComparator.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Psalm/Internal/Type/Comparator/ObjectComparator.php b/src/Psalm/Internal/Type/Comparator/ObjectComparator.php index a2b984432..2a312c771 100644 --- a/src/Psalm/Internal/Type/Comparator/ObjectComparator.php +++ b/src/Psalm/Internal/Type/Comparator/ObjectComparator.php @@ -95,13 +95,14 @@ class ObjectComparator } elseif ($intersection_input_type instanceof TTemplateParam) { $container_param = $intersection_container_type->param_name; $container_class = $intersection_container_type->defining_class; - $input_class_like = $codebase->classlikes->getStorageFor($intersection_input_type->defining_class); + $input_class_like = $codebase->classlikes + ->getStorageFor($intersection_input_type->defining_class); - if ( - $codebase->classlikes->traitExists($container_class) + if ($codebase->classlikes->traitExists($container_class) && !is_null($input_class_like) - && isset($input_class_like->template_extended_params[$container_class][$container_param]) - ) { + && isset( + $input_class_like->template_extended_params[$container_class][$container_param] + )) { continue 2; } }