Skip to content

Commit 9f3872b

Browse files
committed
formatting
1 parent fd33a5c commit 9f3872b

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/Database/Adapter/MariaDB.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1986,7 +1986,7 @@ public function deleteDocuments(string $collection, array $internalIds, array $p
19861986
throw new DatabaseException('Failed to delete documents');
19871987
}
19881988

1989-
if(!empty($permissionIds)){
1989+
if (!empty($permissionIds)) {
19901990
$sql = "
19911991
DELETE FROM {$this->getSQLTable($name . '_perms')}
19921992
WHERE _document IN (" . \implode(', ', \array_map(fn ($index) => ":_id_{$index}", \array_keys($permissionIds))) . ")

src/Database/Adapter/Postgres.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1793,7 +1793,7 @@ public function deleteDocuments(string $collection, array $internalIds, array $p
17931793
throw new DatabaseException('Failed to delete documents');
17941794
}
17951795

1796-
if(!empty($permissionIds)){
1796+
if (!empty($permissionIds)) {
17971797
$sql = "
17981798
DELETE FROM {$this->getSQLTable($name . '_perms')}
17991799
WHERE _document IN (" . \implode(', ', \array_map(fn ($index) => ":_id_{$index}", \array_keys($permissionIds))) . ")

src/Database/Database.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5513,7 +5513,7 @@ public function deleteDocuments(string $collection, array $queries = [], int $ba
55135513
foreach ($affectedDocuments as $document) {
55145514
$documents[] = $document;
55155515
$internalId[] = $document->getInternalId();
5516-
if(!empty($document->getPermissions())){
5516+
if (!empty($document->getPermissions())) {
55175517
$permIds[] = $document->getId();
55185518
}
55195519

@@ -5536,7 +5536,7 @@ public function deleteDocuments(string $collection, array $queries = [], int $ba
55365536
}
55375537
}
55385538

5539-
$this->withTransaction(function () use ($affectedDocuments, $collection, $batchSize, $skipAuth, $authorization, $internalId, $permIds) {
5539+
$this->withTransaction(function () use ($collection, $skipAuth, $authorization, $internalId, $permIds) {
55405540
$getResults = fn () => $this->adapter->deleteDocuments(
55415541
$collection->getId(),
55425542
$internalId,
@@ -5548,7 +5548,7 @@ public function deleteDocuments(string $collection, array $queries = [], int $ba
55485548

55495549
if (count($affectedDocuments) < $batchSize) {
55505550
break;
5551-
} elseif ($originalLimit && count($documents) == $originalLimit) {
5551+
} elseif ($originalLimit && count($documents) >= $originalLimit) {
55525552
break;
55535553
}
55545554

0 commit comments

Comments
 (0)