diff options
Diffstat (limited to 'apps/updatenotification')
6 files changed, 9 insertions, 10 deletions
diff --git a/apps/updatenotification/lib/Notification/BackgroundJob.php b/apps/updatenotification/lib/Notification/BackgroundJob.php index d352375163f..b32ec024a16 100644 --- a/apps/updatenotification/lib/Notification/BackgroundJob.php +++ b/apps/updatenotification/lib/Notification/BackgroundJob.php @@ -37,7 +37,6 @@ use OCP\IGroupManager; use OCP\Notification\IManager; class BackgroundJob extends TimedJob { - protected $connectionNotifications = [3, 7, 14, 30]; /** @var IConfig */ diff --git a/apps/updatenotification/lib/ResetTokenBackgroundJob.php b/apps/updatenotification/lib/ResetTokenBackgroundJob.php index 9bd414d1e5c..d64a26c62e8 100644 --- a/apps/updatenotification/lib/ResetTokenBackgroundJob.php +++ b/apps/updatenotification/lib/ResetTokenBackgroundJob.php @@ -59,9 +59,8 @@ class ResetTokenBackgroundJob extends TimedJob { */ protected function run($argument) { // Delete old tokens after 2 days - if($this->timeFactory->getTime() - $this->config->getAppValue('core', 'updater.secret.created', $this->timeFactory->getTime()) >= 172800) { + if ($this->timeFactory->getTime() - $this->config->getAppValue('core', 'updater.secret.created', $this->timeFactory->getTime()) >= 172800) { $this->config->deleteSystemValue('updater.secret'); } } - } diff --git a/apps/updatenotification/lib/Settings/Admin.php b/apps/updatenotification/lib/Settings/Admin.php index db2efffc46b..f623e69e02e 100644 --- a/apps/updatenotification/lib/Settings/Admin.php +++ b/apps/updatenotification/lib/Settings/Admin.php @@ -126,22 +126,22 @@ class Admin implements ISettings { protected function filterChanges(array $changes): array { $filtered = []; - if(isset($changes['changelogURL'])) { + if (isset($changes['changelogURL'])) { $filtered['changelogURL'] = $changes['changelogURL']; } - if(!isset($changes['whatsNew'])) { + if (!isset($changes['whatsNew'])) { return $filtered; } $iterator = $this->l10nFactory->getLanguageIterator(); do { $lang = $iterator->current(); - if(isset($changes['whatsNew'][$lang])) { + if (isset($changes['whatsNew'][$lang])) { $filtered['whatsNew'] = $changes['whatsNew'][$lang]; return $filtered; } $iterator->next(); - } while($lang !== 'en' && $iterator->valid()); + } while ($lang !== 'en' && $iterator->valid()); return $filtered; } diff --git a/apps/updatenotification/tests/Controller/AdminControllerTest.php b/apps/updatenotification/tests/Controller/AdminControllerTest.php index 597b646ee6b..e40364cce09 100644 --- a/apps/updatenotification/tests/Controller/AdminControllerTest.php +++ b/apps/updatenotification/tests/Controller/AdminControllerTest.php @@ -101,5 +101,4 @@ class AdminControllerTest extends TestCase { $expected = new DataResponse('MyGeneratedToken'); $this->assertEquals($expected, $this->adminController->createCredentials()); } - } diff --git a/apps/updatenotification/tests/Notification/BackgroundJobTest.php b/apps/updatenotification/tests/Notification/BackgroundJobTest.php index 04b0260811e..92f7bc2a8aa 100644 --- a/apps/updatenotification/tests/Notification/BackgroundJobTest.php +++ b/apps/updatenotification/tests/Notification/BackgroundJobTest.php @@ -80,7 +80,8 @@ class BackgroundJobTest extends TestCase { $this->client, $this->installer ); - } { + } + { return $this->getMockBuilder(BackgroundJob::class) ->setConstructorArgs([ $this->config, diff --git a/apps/updatenotification/tests/Notification/NotifierTest.php b/apps/updatenotification/tests/Notification/NotifierTest.php index 6c36a8a74aa..e071fb06b23 100644 --- a/apps/updatenotification/tests/Notification/NotifierTest.php +++ b/apps/updatenotification/tests/Notification/NotifierTest.php @@ -77,7 +77,8 @@ class NotifierTest extends TestCase { $this->userSession, $this->groupManager ); - } { + } + { return $this->getMockBuilder(Notifier::class) ->setConstructorArgs([ $this->urlGenerator, |