From 717a5855c770ef66192f5b9448060b1f576c6e93 Mon Sep 17 00:00:00 2001 From: Arshia Montakhabi Date: Sat, 30 Mar 2024 12:12:22 +0330 Subject: [PATCH] perf: Simplify logic with dedicated helper function 'blank' --- helpers.php | 8 -------- 1 file changed, 8 deletions(-) diff --git a/helpers.php b/helpers.php index 6dcb131b..3c36c816 100755 --- a/helpers.php +++ b/helpers.php @@ -43,10 +43,6 @@ function append_config(array $array) */ function blank($value) { - if (is_null($value)) { - return true; - } - if (is_string($value)) { return trim($value) === ''; } @@ -55,10 +51,6 @@ function blank($value) return false; } - if ($value instanceof Countable) { - return count($value) === 0; - } - return empty($value); } }