diff options
Diffstat (limited to 'apps/dav/lib/BackgroundJob')
6 files changed, 16 insertions, 19 deletions
diff --git a/apps/dav/lib/BackgroundJob/BuildReminderIndexBackgroundJob.php b/apps/dav/lib/BackgroundJob/BuildReminderIndexBackgroundJob.php index 5d0b25d747b..ad5bf7736ab 100644 --- a/apps/dav/lib/BackgroundJob/BuildReminderIndexBackgroundJob.php +++ b/apps/dav/lib/BackgroundJob/BuildReminderIndexBackgroundJob.php @@ -117,7 +117,7 @@ class BuildReminderIndexBackgroundJob extends QueuedJob { ->orderBy('id', 'ASC'); $stmt = $query->execute(); - while($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { + while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { $offset = $row['id']; if (is_resource($row['calendardata'])) { $row['calendardata'] = stream_get_contents($row['calendardata']); @@ -126,7 +126,7 @@ class BuildReminderIndexBackgroundJob extends QueuedJob { try { $this->reminderService->onTouchCalendarObject('\OCA\DAV\CalDAV\CalDavBackend::createCalendarObject', $row); - } catch(\Exception $ex) { + } catch (\Exception $ex) { $this->logger->logException($ex); } diff --git a/apps/dav/lib/BackgroundJob/CleanupDirectLinksJob.php b/apps/dav/lib/BackgroundJob/CleanupDirectLinksJob.php index d815b999c87..60eae25fdcc 100644 --- a/apps/dav/lib/BackgroundJob/CleanupDirectLinksJob.php +++ b/apps/dav/lib/BackgroundJob/CleanupDirectLinksJob.php @@ -48,5 +48,4 @@ class CleanupDirectLinksJob extends TimedJob { // Delete all shares expired 24 hours ago $this->mapper->deleteExpired($this->timeFactory->getTime() - 60*60*24); } - } diff --git a/apps/dav/lib/BackgroundJob/RefreshWebcalJob.php b/apps/dav/lib/BackgroundJob/RefreshWebcalJob.php index f1d56775903..72401d0f7d1 100644 --- a/apps/dav/lib/BackgroundJob/RefreshWebcalJob.php +++ b/apps/dav/lib/BackgroundJob/RefreshWebcalJob.php @@ -92,7 +92,7 @@ class RefreshWebcalJob extends Job { try { /** @var DateInterval $dateInterval */ $dateInterval = DateTimeParser::parseDuration($refreshRate); - } catch(InvalidDataException $ex) { + } catch (InvalidDataException $ex) { $this->logger->logException($ex); $this->logger->warning("Subscription $subscriptionId could not be refreshed, refreshrate in database is invalid"); return; @@ -142,7 +142,7 @@ class RefreshWebcalJob extends Job { RefreshWebcalService::STRIP_TODOS, ]; - foreach($forceInt as $column) { + foreach ($forceInt as $column) { if (isset($row[$column])) { $row[$column] = (int) $row[$column]; } diff --git a/apps/dav/lib/BackgroundJob/RegisterRegenerateBirthdayCalendars.php b/apps/dav/lib/BackgroundJob/RegisterRegenerateBirthdayCalendars.php index 8396bfb9a5a..d0427b6c5c3 100644 --- a/apps/dav/lib/BackgroundJob/RegisterRegenerateBirthdayCalendars.php +++ b/apps/dav/lib/BackgroundJob/RegisterRegenerateBirthdayCalendars.php @@ -64,5 +64,4 @@ class RegisterRegenerateBirthdayCalendars extends QueuedJob { ]); }); } - } diff --git a/apps/dav/lib/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJob.php b/apps/dav/lib/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJob.php index 7fe107e0004..cd01e7ae94d 100644 --- a/apps/dav/lib/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJob.php +++ b/apps/dav/lib/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJob.php @@ -106,7 +106,7 @@ class UpdateCalendarResourcesRoomsBackgroundJob extends TimedJob { string $principalPrefix):void { $backends = $backendManager->getBackends(); - foreach($backends as $backend) { + foreach ($backends as $backend) { $backendId = $backend->getBackendIdentifier(); try { @@ -115,7 +115,7 @@ class UpdateCalendarResourcesRoomsBackgroundJob extends TimedJob { } else { $list = $backend->listAllRooms(); } - } catch(BackendTemporarilyUnavailableException $ex) { + } catch (BackendTemporarilyUnavailableException $ex) { continue; } @@ -124,7 +124,7 @@ class UpdateCalendarResourcesRoomsBackgroundJob extends TimedJob { $deletedIds = array_diff($cachedList, $list); $editedIds = array_intersect($list, $cachedList); - foreach($newIds as $newId) { + foreach ($newIds as $newId) { try { if ($backend instanceof IResourceBackend) { $resource = $backend->getResource($newId); @@ -136,7 +136,7 @@ class UpdateCalendarResourcesRoomsBackgroundJob extends TimedJob { if ($resource instanceof IMetadataProvider) { $metadata = $this->getAllMetadataOfBackend($resource); } - } catch(BackendTemporarilyUnavailableException $ex) { + } catch (BackendTemporarilyUnavailableException $ex) { continue; } @@ -146,7 +146,7 @@ class UpdateCalendarResourcesRoomsBackgroundJob extends TimedJob { // when an event is actually scheduled with this resource / room } - foreach($deletedIds as $deletedId) { + foreach ($deletedIds as $deletedId) { $id = $this->getIdForBackendAndResource($dbTable, $backendId, $deletedId); $this->deleteFromCache($dbTable, $id); $this->deleteMetadataFromCache($dbTableMetadata, $foreignKey, $id); @@ -155,7 +155,7 @@ class UpdateCalendarResourcesRoomsBackgroundJob extends TimedJob { $this->deleteCalendarDataForResource($principalPrefix, $principalName); } - foreach($editedIds as $editedId) { + foreach ($editedIds as $editedId) { $id = $this->getIdForBackendAndResource($dbTable, $backendId, $editedId); try { @@ -169,7 +169,7 @@ class UpdateCalendarResourcesRoomsBackgroundJob extends TimedJob { if ($resource instanceof IMetadataProvider) { $metadata = $this->getAllMetadataOfBackend($resource); } - } catch(BackendTemporarilyUnavailableException $ex) { + } catch (BackendTemporarilyUnavailableException $ex) { continue; } @@ -220,7 +220,7 @@ class UpdateCalendarResourcesRoomsBackgroundJob extends TimedJob { string $foreignKey, int $foreignId, array $metadata):void { - foreach($metadata as $key => $value) { + foreach ($metadata as $key => $value) { $query = $this->dbConnection->getQueryBuilder(); $query->insert($table) ->values([ @@ -308,7 +308,7 @@ class UpdateCalendarResourcesRoomsBackgroundJob extends TimedJob { ->execute(); } - foreach($deletedMetadata as $key => $value) { + foreach ($deletedMetadata as $key => $value) { $query = $this->dbConnection->getQueryBuilder(); $query->delete($dbTable) ->where($query->expr()->eq($foreignKey, $query->createNamedParameter($id))) @@ -317,7 +317,7 @@ class UpdateCalendarResourcesRoomsBackgroundJob extends TimedJob { } $existingKeys = array_keys(array_intersect_key($metadata, $cachedMetadata)); - foreach($existingKeys as $existingKey) { + foreach ($existingKeys as $existingKey) { if ($metadata[$existingKey] !== $cachedMetadata[$existingKey]) { $query = $this->dbConnection->getQueryBuilder(); $query->update($dbTable) @@ -352,7 +352,7 @@ class UpdateCalendarResourcesRoomsBackgroundJob extends TimedJob { $keys = $resource->getAllAvailableMetadataKeys(); $metadata = []; - foreach($keys as $key) { + foreach ($keys as $key) { $metadata[$key] = $resource->getMetadataForKey($key); } @@ -376,7 +376,7 @@ class UpdateCalendarResourcesRoomsBackgroundJob extends TimedJob { $rows = $stmt->fetchAll(\PDO::FETCH_ASSOC); $metadata = []; - foreach($rows as $row) { + foreach ($rows as $row) { $metadata[$row['key']] = $row['value']; } diff --git a/apps/dav/lib/BackgroundJob/UploadCleanup.php b/apps/dav/lib/BackgroundJob/UploadCleanup.php index f5863ddeafe..71b0b515872 100644 --- a/apps/dav/lib/BackgroundJob/UploadCleanup.php +++ b/apps/dav/lib/BackgroundJob/UploadCleanup.php @@ -86,5 +86,4 @@ class UploadCleanup extends TimedJob { $this->jobList->remove(self::class, $argument); } } - } |