From aabdb3f76566419eed8702749897a6d07388a169 Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Wed, 30 Apr 2025 06:51:49 +0400 Subject: [PATCH] cosmetic --- php/src/db/CapacitorStorage.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/php/src/db/CapacitorStorage.php b/php/src/db/CapacitorStorage.php index e7ff6af..ba00c07 100644 --- a/php/src/db/CapacitorStorage.php +++ b/php/src/db/CapacitorStorage.php @@ -677,7 +677,7 @@ abstract class CapacitorStorage { function _delete(CapacitorChannel $channel, $filter, $func, ?array $args): int { $this->_create($channel); if ($func === null) $func = CapacitorChannel::onDelete; - $onEach = func::with($func)->bind($channel); + $onDelete = func::with($func)->bind($channel); $db = $this->db(); # si on est déjà dans une transaction, désactiver la gestion des transactions $manageTransactions = $channel->isManageTransactions() && !$db->inTransaction(); @@ -693,8 +693,8 @@ abstract class CapacitorStorage { $all = $this->_allCached("delete", $channel, $filter); foreach ($all as $values) { $rowIds = $this->getRowIds($channel, $values); - $delete = boolval($onEach->invoke([$values["item"], $values, ...$args])); - if ($delete) { + $shouldDelete = boolval($onDelete->invoke([$values["item"], $values, ...$args])); + if ($shouldDelete) { $db->exec([ "delete", "from" => $tableName,