From 7f40489202a228dd27b2126be6d2c74a81fa9364 Mon Sep 17 00:00:00 2001 From: orklah Date: Wed, 5 Jan 2022 23:41:56 +0100 Subject: [PATCH] fix inverted condition --- src/Psalm/Internal/Type/SimpleAssertionReconciler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Psalm/Internal/Type/SimpleAssertionReconciler.php b/src/Psalm/Internal/Type/SimpleAssertionReconciler.php index e340d336798..baf3479524c 100644 --- a/src/Psalm/Internal/Type/SimpleAssertionReconciler.php +++ b/src/Psalm/Internal/Type/SimpleAssertionReconciler.php @@ -554,7 +554,7 @@ private static function reconcileNonEmptyCountable( if (!$array_atomic_type instanceof TNonEmptyArray || ($array_atomic_type->count < $min_count) ) { - if (!$array_atomic_type->isEmptyArray()) { + if ($array_atomic_type->isEmptyArray()) { $existing_var_type->removeType('array'); } else { $non_empty_array = new TNonEmptyArray(