Skip to content

Commit 7190303

Browse files
committed
refactor: make if condition more strict
1 parent 656db64 commit 7190303

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

phpstan-baseline.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1341,11 +1341,6 @@
13411341
'count' => 7,
13421342
'path' => __DIR__ . '/system/Database/Postgre/Builder.php',
13431343
];
1344-
$ignoreErrors[] = [
1345-
'message' => '#^Only booleans are allowed in a negated boolean, array\\<int\\|string, array\\<int, int\\|string\\>\\|string\\> given\\.$#',
1346-
'count' => 1,
1347-
'path' => __DIR__ . '/system/Database/Postgre/Builder.php',
1348-
];
13491344
$ignoreErrors[] = [
13501345
'message' => '#^Return type \\(CodeIgniter\\\\Database\\\\BaseBuilder\\) of method CodeIgniter\\\\Database\\\\Postgre\\\\Builder\\:\\:join\\(\\) should be covariant with return type \\(\\$this\\(CodeIgniter\\\\Database\\\\BaseBuilder\\)\\) of method CodeIgniter\\\\Database\\\\BaseBuilder\\:\\:join\\(\\)$#',
13511346
'count' => 1,

system/Database/Postgre/Builder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public function replace(?array $set = null)
146146
$this->set($set);
147147
}
148148

149-
if (! $this->QBSet) {
149+
if ($this->QBSet === []) {
150150
if ($this->db->DBDebug) {
151151
throw new DatabaseException('You must use the "set" method to update an entry.');
152152
}

0 commit comments

Comments
 (0)