fix phpcs

Signed-off-by: Luka Trovic <luka@nextcloud.com>
This commit is contained in:
Luka Trovic
2024-09-26 17:12:20 +02:00
parent 2a7c5b9c9c
commit 439c2b422e
44 changed files with 67 additions and 65 deletions

View File

@@ -24,7 +24,7 @@ class ChangeHelper {
IDBConnection $db,
ICacheFactory $cacheFactory,
IRequest $request,
?string $userId
?string $userId,
) {
$this->db = $db;
$this->cache = $cacheFactory->createDistributed('deck_changes');
@@ -43,7 +43,7 @@ class ChangeHelper {
public function cardChanged($cardId, $updateCard = true) {
$time = time();
$etag = md5($time . microtime());
$this->cache->set(self::TYPE_CARD . '-' .$cardId, $etag);
$this->cache->set(self::TYPE_CARD . '-' . $cardId, $etag);
if ($updateCard) {
$sql = 'UPDATE `*PREFIX*deck_cards` SET `last_modified` = ?, `last_editor` = ? WHERE `id` = ?';
$this->db->executeUpdate($sql, [time(), $this->userId, $cardId]);
@@ -60,7 +60,7 @@ class ChangeHelper {
public function stackChanged($stackId, $updateBoard = true) {
$time = time();
$etag = md5($time . microtime());
$this->cache->set(self::TYPE_CARD . '-' .$stackId, $etag);
$this->cache->set(self::TYPE_CARD . '-' . $stackId, $etag);
if ($updateBoard) {
$sql = 'UPDATE `*PREFIX*deck_stacks` SET `last_modified` = ? WHERE `id` = ?';
$this->db->executeUpdate($sql, [time(), $stackId]);
@@ -76,7 +76,7 @@ class ChangeHelper {
}
public function getEtag($type, $id) {
$entry = $this->cache->get($type . '-' .$id);
$entry = $this->cache->get($type . '-' . $id);
if ($entry === 'null') {
return '';
}