Skip to content

Commit 8bd3ec7

Browse files
committed
Run Rector
1 parent 9230a86 commit 8bd3ec7

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

system/Database/SQLite3/Builder.php

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -231,14 +231,11 @@ protected function _deleteBatch(string $table, array $keys, array $values): stri
231231
return ''; // @codeCoverageIgnore
232232
}
233233

234-
$alias = $this->QBOptions['alias'] ?? '_u';
235-
236234
$sql = 'DELETE FROM ' . $table . "\n";
237235

238-
if (current($constraints) instanceof RawSql) {
239-
if ($this->db->DBDebug) {
240-
throw new DatabaseException('You cannot use RawSql for constraint in SQLite.'); // @codeCoverageIgnore
241-
}
236+
if (current($constraints) instanceof RawSql && $this->db->DBDebug) {
237+
throw new DatabaseException('You cannot use RawSql for constraint in SQLite.');
238+
// @codeCoverageIgnore
242239
}
243240

244241
if (is_string(current(array_keys($constraints)))) {
@@ -252,10 +249,9 @@ protected function _deleteBatch(string $table, array $keys, array $values): stri
252249
$sql .= "WHERE {$concat1} IN (SELECT {$concat2} FROM (\n{:_table_:}))";
253250

254251
// where is not supported
255-
if ($this->QBWhere !== []) {
256-
if ($this->db->DBDebug) {
257-
throw new DatabaseException('You cannot use WHERE with SQLite.'); // @codeCoverageIgnore
258-
}
252+
if ($this->QBWhere !== [] && $this->db->DBDebug) {
253+
throw new DatabaseException('You cannot use WHERE with SQLite.');
254+
// @codeCoverageIgnore
259255
}
260256

261257
$this->QBOptions['sql'] = $sql;

0 commit comments

Comments
 (0)