From 447e8301c81211fac78c57e71318970a4d4400c7 Mon Sep 17 00:00:00 2001 From: Brandon Date: Sun, 30 Jul 2023 01:09:51 -0500 Subject: [PATCH] chore(util): Do not use `else` --- src/Util.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Util.php b/src/Util.php index c197126..831500b 100644 --- a/src/Util.php +++ b/src/Util.php @@ -146,11 +146,9 @@ public static function toString($expression, $single = false) $keys = ''; foreach ($expression as $key => $value) { - if ($single) { - $keys .= self::wrap($value).','; - } else { - $keys .= self::wrap($key).' => '.self::wrap($value).', '; - } + $keys .= $single ? + self::wrap($value).',' : + self::wrap($key).' => '.self::wrap($value).', '; } $keys = trim(Str::replaceLast(',', '', $keys));