From 1e132be0828f90d5c269f9373f0690be37f7889a Mon Sep 17 00:00:00 2001 From: brandonkelly Date: Sat, 2 Jun 2018 07:11:47 -0700 Subject: [PATCH] Flatten Db::parseParam() --- src/helpers/Db.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/helpers/Db.php b/src/helpers/Db.php index 1c3cd9d7e90..24b60e51861 100644 --- a/src/helpers/Db.php +++ b/src/helpers/Db.php @@ -493,7 +493,10 @@ public static function parseParam(string $column, $value, string $defaultOperato ]; } } - } else if (is_string($val)) { + continue; + } + + if (is_string($val)) { // Trim any whitespace from the value $val = trim($val); @@ -515,12 +518,11 @@ public static function parseParam(string $column, $value, string $defaultOperato $val, false ]; - } else { - $condition[] = [$operator, $column, $val]; + continue; } - } else { - $condition[] = [$operator, $column, $val]; } + + $condition[] = [$operator, $column, $val]; } return $condition;