Skip to content

Commit

Permalink
chore(util): Do not use else
Browse files Browse the repository at this point in the history
  • Loading branch information
Log1x committed Jul 30, 2023
1 parent d8c3536 commit 447e830
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 447e830

Please sign in to comment.