diff options
author | Joas Schilling <coding@schilljs.com> | 2023-11-23 10:22:34 +0100 |
---|---|---|
committer | Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com> | 2023-11-23 10:36:13 +0100 |
commit | aa5f037af71c915424c6dcfd5ad2dc82797dc0d6 (patch) | |
tree | 843203cd1346158aab3515687e37a90e78c929e9 /apps/dav/lib/BackgroundJob | |
parent | 272719ed1cba6836ea0a597bb9767754eeb1e0d4 (diff) | |
download | nextcloud-server-aa5f037af71c915424c6dcfd5ad2dc82797dc0d6.tar.gz nextcloud-server-aa5f037af71c915424c6dcfd5ad2dc82797dc0d6.zip |
chore: apply changes from Nextcloud coding standards 1.1.1
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
Diffstat (limited to 'apps/dav/lib/BackgroundJob')
9 files changed, 46 insertions, 47 deletions
diff --git a/apps/dav/lib/BackgroundJob/BuildReminderIndexBackgroundJob.php b/apps/dav/lib/BackgroundJob/BuildReminderIndexBackgroundJob.php index a2607ca13c4..d1cafbf57c2 100644 --- a/apps/dav/lib/BackgroundJob/BuildReminderIndexBackgroundJob.php +++ b/apps/dav/lib/BackgroundJob/BuildReminderIndexBackgroundJob.php @@ -59,10 +59,10 @@ class BuildReminderIndexBackgroundJob extends QueuedJob { * BuildReminderIndexBackgroundJob constructor. */ public function __construct(IDBConnection $db, - ReminderService $reminderService, - LoggerInterface $logger, - IJobList $jobList, - ITimeFactory $timeFactory) { + ReminderService $reminderService, + LoggerInterface $logger, + IJobList $jobList, + ITimeFactory $timeFactory) { parent::__construct($timeFactory); $this->db = $db; $this->reminderService = $reminderService; diff --git a/apps/dav/lib/BackgroundJob/CalendarRetentionJob.php b/apps/dav/lib/BackgroundJob/CalendarRetentionJob.php index b57ed07d5c2..96ceb644489 100644 --- a/apps/dav/lib/BackgroundJob/CalendarRetentionJob.php +++ b/apps/dav/lib/BackgroundJob/CalendarRetentionJob.php @@ -34,7 +34,7 @@ class CalendarRetentionJob extends TimedJob { private $service; public function __construct(ITimeFactory $time, - RetentionService $service) { + RetentionService $service) { parent::__construct($time); $this->service = $service; diff --git a/apps/dav/lib/BackgroundJob/EventReminderJob.php b/apps/dav/lib/BackgroundJob/EventReminderJob.php index 55cecf5519d..f628a728404 100644 --- a/apps/dav/lib/BackgroundJob/EventReminderJob.php +++ b/apps/dav/lib/BackgroundJob/EventReminderJob.php @@ -40,8 +40,8 @@ class EventReminderJob extends TimedJob { private $config; public function __construct(ITimeFactory $time, - ReminderService $reminderService, - IConfig $config) { + ReminderService $reminderService, + IConfig $config) { parent::__construct($time); $this->reminderService = $reminderService; $this->config = $config; diff --git a/apps/dav/lib/BackgroundJob/GenerateBirthdayCalendarBackgroundJob.php b/apps/dav/lib/BackgroundJob/GenerateBirthdayCalendarBackgroundJob.php index 8e72e8f076c..220050b3927 100644 --- a/apps/dav/lib/BackgroundJob/GenerateBirthdayCalendarBackgroundJob.php +++ b/apps/dav/lib/BackgroundJob/GenerateBirthdayCalendarBackgroundJob.php @@ -39,8 +39,8 @@ class GenerateBirthdayCalendarBackgroundJob extends QueuedJob { private $config; public function __construct(ITimeFactory $time, - BirthdayService $birthdayService, - IConfig $config) { + BirthdayService $birthdayService, + IConfig $config) { parent::__construct($time); $this->birthdayService = $birthdayService; diff --git a/apps/dav/lib/BackgroundJob/PruneOutdatedSyncTokensJob.php b/apps/dav/lib/BackgroundJob/PruneOutdatedSyncTokensJob.php index deca55a26cb..74969069387 100644 --- a/apps/dav/lib/BackgroundJob/PruneOutdatedSyncTokensJob.php +++ b/apps/dav/lib/BackgroundJob/PruneOutdatedSyncTokensJob.php @@ -25,11 +25,11 @@ declare(strict_types=1); */ namespace OCA\DAV\BackgroundJob; -use OCP\AppFramework\Utility\ITimeFactory; -use OCP\BackgroundJob\TimedJob; use OCA\DAV\AppInfo\Application; use OCA\DAV\CalDAV\CalDavBackend; use OCA\DAV\CardDAV\CardDavBackend; +use OCP\AppFramework\Utility\ITimeFactory; +use OCP\BackgroundJob\TimedJob; use OCP\IConfig; use Psr\Log\LoggerInterface; diff --git a/apps/dav/lib/BackgroundJob/RegisterRegenerateBirthdayCalendars.php b/apps/dav/lib/BackgroundJob/RegisterRegenerateBirthdayCalendars.php index 85da81b3b91..8c0b5e3ea45 100644 --- a/apps/dav/lib/BackgroundJob/RegisterRegenerateBirthdayCalendars.php +++ b/apps/dav/lib/BackgroundJob/RegisterRegenerateBirthdayCalendars.php @@ -49,8 +49,8 @@ class RegisterRegenerateBirthdayCalendars extends QueuedJob { * @param IJobList $jobList */ public function __construct(ITimeFactory $time, - IUserManager $userManager, - IJobList $jobList) { + IUserManager $userManager, + IJobList $jobList) { parent::__construct($time); $this->userManager = $userManager; $this->jobList = $jobList; diff --git a/apps/dav/lib/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJob.php b/apps/dav/lib/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJob.php index f0ff16d3f2f..b4571e2509d 100644 --- a/apps/dav/lib/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJob.php +++ b/apps/dav/lib/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJob.php @@ -55,10 +55,10 @@ class UpdateCalendarResourcesRoomsBackgroundJob extends TimedJob { private $calDavBackend; public function __construct(ITimeFactory $time, - IResourceManager $resourceManager, - IRoomManager $roomManager, - IDBConnection $dbConnection, - CalDavBackend $calDavBackend) { + IResourceManager $resourceManager, + IRoomManager $roomManager, + IDBConnection $dbConnection, + CalDavBackend $calDavBackend) { parent::__construct($time); $this->resourceManager = $resourceManager; $this->roomManager = $roomManager; @@ -101,10 +101,10 @@ class UpdateCalendarResourcesRoomsBackgroundJob extends TimedJob { * @param string $principalPrefix */ private function runForBackend($backendManager, - string $dbTable, - string $dbTableMetadata, - string $foreignKey, - string $principalPrefix): void { + string $dbTable, + string $dbTableMetadata, + string $foreignKey, + string $principalPrefix): void { $backends = $backendManager->getBackends(); foreach ($backends as $backend) { @@ -194,8 +194,8 @@ class UpdateCalendarResourcesRoomsBackgroundJob extends TimedJob { * @return int Insert id */ private function addToCache(string $table, - string $backendId, - $remote): int { + string $backendId, + $remote): int { $query = $this->dbConnection->getQueryBuilder(); $query->insert($table) ->values([ @@ -219,9 +219,9 @@ class UpdateCalendarResourcesRoomsBackgroundJob extends TimedJob { * @param array $metadata */ private function addMetadataToCache(string $table, - string $foreignKey, - int $foreignId, - array $metadata): void { + string $foreignKey, + int $foreignId, + array $metadata): void { foreach ($metadata as $key => $value) { $query = $this->dbConnection->getQueryBuilder(); $query->insert($table) @@ -241,7 +241,7 @@ class UpdateCalendarResourcesRoomsBackgroundJob extends TimedJob { * @param int $id */ private function deleteFromCache(string $table, - int $id): void { + int $id): void { $query = $this->dbConnection->getQueryBuilder(); $query->delete($table) ->where($query->expr()->eq('id', $query->createNamedParameter($id))) @@ -254,8 +254,8 @@ class UpdateCalendarResourcesRoomsBackgroundJob extends TimedJob { * @param int $id */ private function deleteMetadataFromCache(string $table, - string $foreignKey, - int $id): void { + string $foreignKey, + int $id): void { $query = $this->dbConnection->getQueryBuilder(); $query->delete($table) ->where($query->expr()->eq($foreignKey, $query->createNamedParameter($id))) @@ -270,8 +270,8 @@ class UpdateCalendarResourcesRoomsBackgroundJob extends TimedJob { * @param IResource|IRoom $remote */ private function updateCache(string $table, - int $id, - $remote): void { + int $id, + $remote): void { $query = $this->dbConnection->getQueryBuilder(); $query->update($table) ->set('email', $query->createNamedParameter($remote->getEMail())) @@ -292,10 +292,10 @@ class UpdateCalendarResourcesRoomsBackgroundJob extends TimedJob { * @param array $cachedMetadata */ private function updateMetadataCache(string $dbTable, - string $foreignKey, - int $id, - array $metadata, - array $cachedMetadata): void { + string $foreignKey, + int $id, + array $metadata, + array $cachedMetadata): void { $newMetadata = array_diff_key($metadata, $cachedMetadata); $deletedMetadata = array_diff_key($cachedMetadata, $metadata); @@ -371,8 +371,8 @@ class UpdateCalendarResourcesRoomsBackgroundJob extends TimedJob { * @return array */ private function getAllMetadataOfCache(string $table, - string $foreignKey, - int $id): array { + string $foreignKey, + int $id): array { $query = $this->dbConnection->getQueryBuilder(); $query->select(['key', 'value']) ->from($table) @@ -398,7 +398,7 @@ class UpdateCalendarResourcesRoomsBackgroundJob extends TimedJob { * @return array */ private function getAllCachedByBackend(string $tableName, - string $backendId): array { + string $backendId): array { $query = $this->dbConnection->getQueryBuilder(); $query->select('resource_id') ->from($tableName) @@ -417,7 +417,7 @@ class UpdateCalendarResourcesRoomsBackgroundJob extends TimedJob { * @param $principalUri */ private function deleteCalendarDataForResource(string $principalPrefix, - string $principalUri): void { + string $principalUri): void { $calendar = $this->calDavBackend->getCalendarByUri( implode('/', [$principalPrefix, $principalUri]), CalDavBackend::RESOURCE_BOOKING_CALENDAR_URI); @@ -438,8 +438,8 @@ class UpdateCalendarResourcesRoomsBackgroundJob extends TimedJob { * @return int */ private function getIdForBackendAndResource(string $table, - string $backendId, - string $resourceId): int { + string $backendId, + string $resourceId): int { $query = $this->dbConnection->getQueryBuilder(); $query->select('id') ->from($table) diff --git a/apps/dav/lib/BackgroundJob/UploadCleanup.php b/apps/dav/lib/BackgroundJob/UploadCleanup.php index 3a6f296deaf..c35aff4d15a 100644 --- a/apps/dav/lib/BackgroundJob/UploadCleanup.php +++ b/apps/dav/lib/BackgroundJob/UploadCleanup.php @@ -32,7 +32,6 @@ use OCP\AppFramework\Utility\ITimeFactory; use OCP\BackgroundJob\IJob; use OCP\BackgroundJob\IJobList; use OCP\BackgroundJob\TimedJob; -use OCP\Files\Node; use OCP\Files\File; use OCP\Files\Folder; use OCP\Files\IRootFolder; diff --git a/apps/dav/lib/BackgroundJob/UserStatusAutomation.php b/apps/dav/lib/BackgroundJob/UserStatusAutomation.php index 43fccbf233e..53184be6f25 100644 --- a/apps/dav/lib/BackgroundJob/UserStatusAutomation.php +++ b/apps/dav/lib/BackgroundJob/UserStatusAutomation.php @@ -46,11 +46,11 @@ class UserStatusAutomation extends TimedJob { protected IConfig $config; public function __construct(ITimeFactory $timeFactory, - IDBConnection $connection, - IJobList $jobList, - LoggerInterface $logger, - IManager $manager, - IConfig $config) { + IDBConnection $connection, + IJobList $jobList, + LoggerInterface $logger, + IManager $manager, + IConfig $config) { parent::__construct($timeFactory); $this->connection = $connection; $this->jobList = $jobList; |