From 6650bd8a572e886e677f7c323a4c3031a3ad37c9 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Thu, 7 Dec 2023 12:31:21 +0100 Subject: [PATCH] cs-fix --- src/Psalm/Type/Reconciler.php | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/Psalm/Type/Reconciler.php b/src/Psalm/Type/Reconciler.php index 287e9f78816..751d76f63cc 100644 --- a/src/Psalm/Type/Reconciler.php +++ b/src/Psalm/Type/Reconciler.php @@ -338,7 +338,12 @@ public static function reconcileKeyedTypes( if ($type_changed || $failed_reconciliation) { $changed_var_ids[$key] = true; - if (substr($key, -1) === ']' && !$has_inverted_isset && !$has_inverted_key_exists && !$has_empty && !$is_equality) { + if (substr($key, -1) === ']' + && !$has_inverted_isset + && !$has_inverted_key_exists + && !$has_empty + && !$is_equality + ) { self::adjustTKeyedArrayType( $key_parts, $existing_types, @@ -728,11 +733,17 @@ private static function getValueForKey( $new_base_type_candidate = $existing_key_type_part->type_params[1]; - if ($new_base_type_candidate->isMixed() && !$has_isset && !$has_inverted_isset && !$has_inverted_key_exists) { + if ($new_base_type_candidate->isMixed() + && !$has_isset + && !$has_inverted_isset + && !$has_inverted_key_exists + ) { return $new_base_type_candidate; } - if (($has_isset || $has_inverted_isset || $has_inverted_key_exists) && isset($new_assertions[$new_base_key])) { + if (($has_isset || $has_inverted_isset || $has_inverted_key_exists) + && isset($new_assertions[$new_base_key]) + ) { if ($has_inverted_isset && $new_base_key === $key) { $new_base_type_candidate = $new_base_type_candidate->getBuilder(); $new_base_type_candidate->addType(new TNull);