Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbalandan committed Oct 31, 2021
1 parent 23d0522 commit 77dcdec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions system/Database/BaseBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ protected function whereHaving(string $qbKey, $key, $value = null, string $type
$op = trim(current($op));

if (substr($k, -1 * strlen($op)) === $op) {
$k = rtrim(substr($k, 0, -1 * strlen($op)));
$k = rtrim(substr($k, 0, -strlen($op)));
$op = " {$op}";
} else {
$op = '';
Expand All @@ -680,7 +680,7 @@ protected function whereHaving(string $qbKey, $key, $value = null, string $type
$op = ' IS NULL';
} elseif (preg_match('/\s*(!?=|<>|IS(?:\s+NOT)?)\s*$/i', $k, $match, PREG_OFFSET_CAPTURE)) {
$k = substr($k, 0, $match[0][1]);
$op = ($match[1][0] === '=' ? ' IS NULL' : ' IS NOT NULL');
$op = $match[1][0] === '=' ? ' IS NULL' : ' IS NOT NULL';
} else {
$op = '';
}
Expand Down

0 comments on commit 77dcdec

Please sign in to comment.