Skip to content

Commit aed3ad6

Browse files
committed
style: break long line
1 parent 8a9b3c3 commit aed3ad6

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

system/Database/BaseBuilder.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,15 @@ protected function whereHaving(string $qbKey, $key, $value = null, string $type
783783
} elseif (! $this->hasOperator($k) && $qbKey !== 'QBHaving') {
784784
// value appears not to have been set, assign the test to IS NULL
785785
$op = ' IS NULL';
786-
} elseif (preg_match('/\s*(!?=|<>|IS(?:\s+NOT)?)\s*$/i', $k, $match, PREG_OFFSET_CAPTURE)) {
786+
} elseif (
787+
// The key ends with !=, =, <>, IS, IS NOT
788+
preg_match(
789+
'/\s*(!?=|<>|IS(?:\s+NOT)?)\s*$/i',
790+
$k,
791+
$match,
792+
PREG_OFFSET_CAPTURE
793+
)
794+
) {
787795
$k = substr($k, 0, $match[0][1]);
788796
$op = $match[1][0] === '=' ? ' IS NULL' : ' IS NOT NULL';
789797
} else {

0 commit comments

Comments
 (0)