Skip to content

Commit 38f6d32

Browse files
committed
Run Rector
1 parent 7d91b82 commit 38f6d32

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
@@ -224,14 +224,11 @@ protected function _deleteBatch(string $table, array $keys, array $values): stri
224224
return ''; // @codeCoverageIgnore
225225
}
226226

227-
$alias = $this->QBOptions['alias'] ?? '_u';
228-
229227
$sql = 'DELETE FROM ' . $table . "\n";
230228

231-
if (current($constraints) instanceof RawSql) {
232-
if ($this->db->DBDebug) {
233-
throw new DatabaseException('You cannot use RawSql for constraint in SQLite.'); // @codeCoverageIgnore
234-
}
229+
if (current($constraints) instanceof RawSql && $this->db->DBDebug) {
230+
throw new DatabaseException('You cannot use RawSql for constraint in SQLite.');
231+
// @codeCoverageIgnore
235232
}
236233

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

247244
// where is not supported
248-
if ($this->QBWhere !== []) {
249-
if ($this->db->DBDebug) {
250-
throw new DatabaseException('You cannot use WHERE with SQLite.'); // @codeCoverageIgnore
251-
}
245+
if ($this->QBWhere !== [] && $this->db->DBDebug) {
246+
throw new DatabaseException('You cannot use WHERE with SQLite.');
247+
// @codeCoverageIgnore
252248
}
253249

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

0 commit comments

Comments
 (0)