From 85e425f8291c440686240fc38d615c6bb674bc79 Mon Sep 17 00:00:00 2001 From: DariusIII Date: Wed, 13 Aug 2025 12:57:54 +0200 Subject: [PATCH] CS fixes --- Blacklight/processing/ProcessReleases.php | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/Blacklight/processing/ProcessReleases.php b/Blacklight/processing/ProcessReleases.php index da6f1c750..49d9d2bbc 100755 --- a/Blacklight/processing/ProcessReleases.php +++ b/Blacklight/processing/ProcessReleases.php @@ -1142,10 +1142,10 @@ class ProcessReleases private function collectionFileCheckStage6(string $where): void { DB::transaction(function () use ($where) { - $sql = " + $sql = ' UPDATE collections c SET filecheck = ?, totalfiles = (SELECT COUNT(b.id) FROM binaries b WHERE b.collections_id = c.id) WHERE c.dateadded < NOW() - INTERVAL ? HOUR - AND c.filecheck IN (?, ?, 10)".$where; + AND c.filecheck IN (?, ?, 10)'.$where; DB::update($sql, [self::COLLFC_COMPPART, $this->collectionDelayTime, self::COLLFC_DEFAULT, self::COLLFC_COMPCOLL]); }, 10); } @@ -1189,28 +1189,24 @@ class ProcessReleases /** * Normalize and return the group ID. - * - * @param int|string $groupID - * @return int|null */ - private function normalizeGroupId(int|string $groupID): int|null + private function normalizeGroupId(int|string $groupID): ?int { if (is_numeric($groupID)) { return (int) $groupID; } $groupInfo = UsenetGroup::getByName($groupID); + return $groupInfo !== null ? (int) $groupInfo['id'] : null; } /** * Build the SQL "where" snippet for group ID filtering. * - * @param int|null $groupID * @param string $alias Table alias for the group ID column. - * @return string */ - private function groupWhereSql(int|null $groupID, string $alias = 'c'): string + private function groupWhereSql(?int $groupID, string $alias = 'c'): string { return $groupID !== null ? ' AND '.$alias.'.groups_id = '.$groupID.' ' : ' '; }