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/updatenotification | |
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/updatenotification')
7 files changed, 28 insertions, 27 deletions
diff --git a/apps/updatenotification/lib/Controller/APIController.php b/apps/updatenotification/lib/Controller/APIController.php index f9e12525053..d684b69024f 100644 --- a/apps/updatenotification/lib/Controller/APIController.php +++ b/apps/updatenotification/lib/Controller/APIController.php @@ -74,12 +74,12 @@ class APIController extends OCSController { ]; public function __construct(string $appName, - IRequest $request, - IConfig $config, - IAppManager $appManager, - AppFetcher $appFetcher, - IFactory $l10nFactory, - IUserSession $userSession) { + IRequest $request, + IConfig $config, + IAppManager $appManager, + AppFetcher $appFetcher, + IFactory $l10nFactory, + IUserSession $userSession) { parent::__construct($appName, $request); $this->config = $config; @@ -141,7 +141,7 @@ class APIController extends OCSController { $this->language = $this->l10nFactory->getUserLanguage($this->userSession->getUser()); // Ignore apps that are deployed from git - $installedApps = array_filter($installedApps, function(string $appId) { + $installedApps = array_filter($installedApps, function (string $appId) { try { return !file_exists($this->appManager->getAppPath($appId) . '/.git'); } catch (AppPathNotFoundException $e) { diff --git a/apps/updatenotification/lib/Controller/AdminController.php b/apps/updatenotification/lib/Controller/AdminController.php index 74a3a86c7e1..e5a8aa45838 100644 --- a/apps/updatenotification/lib/Controller/AdminController.php +++ b/apps/updatenotification/lib/Controller/AdminController.php @@ -61,12 +61,12 @@ class AdminController extends Controller { * @param IL10N $l10n */ public function __construct($appName, - IRequest $request, - IJobList $jobList, - ISecureRandom $secureRandom, - IConfig $config, - ITimeFactory $timeFactory, - IL10N $l10n) { + IRequest $request, + IJobList $jobList, + ISecureRandom $secureRandom, + IConfig $config, + ITimeFactory $timeFactory, + IL10N $l10n) { parent::__construct($appName, $request); $this->jobList = $jobList; $this->secureRandom = $secureRandom; diff --git a/apps/updatenotification/lib/ResetTokenBackgroundJob.php b/apps/updatenotification/lib/ResetTokenBackgroundJob.php index 6e80f0fc0bf..723922157b3 100644 --- a/apps/updatenotification/lib/ResetTokenBackgroundJob.php +++ b/apps/updatenotification/lib/ResetTokenBackgroundJob.php @@ -26,8 +26,8 @@ declare(strict_types=1); */ namespace OCA\UpdateNotification; -use OCP\BackgroundJob\TimedJob; use OCP\AppFramework\Utility\ITimeFactory; +use OCP\BackgroundJob\TimedJob; use OCP\IConfig; /** @@ -47,7 +47,7 @@ class ResetTokenBackgroundJob extends TimedJob { * @param ITimeFactory $timeFactory */ public function __construct(IConfig $config, - ITimeFactory $timeFactory) { + ITimeFactory $timeFactory) { parent::__construct($timeFactory); // Run all 10 minutes parent::setInterval(60 * 10); diff --git a/apps/updatenotification/lib/ResponseDefinitions.php b/apps/updatenotification/lib/ResponseDefinitions.php index cb6796aac34..24f0df8ae8d 100644 --- a/apps/updatenotification/lib/ResponseDefinitions.php +++ b/apps/updatenotification/lib/ResponseDefinitions.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** diff --git a/apps/updatenotification/lib/Settings/Admin.php b/apps/updatenotification/lib/Settings/Admin.php index 7f47a46f8f9..730be5601a2 100644 --- a/apps/updatenotification/lib/Settings/Admin.php +++ b/apps/updatenotification/lib/Settings/Admin.php @@ -30,18 +30,18 @@ declare(strict_types=1); namespace OCA\UpdateNotification\Settings; use OC\User\Backend; -use OCP\User\Backend\ICountUsersBackend; use OCA\UpdateNotification\UpdateChecker; use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Services\IInitialState; use OCP\IConfig; use OCP\IDateTimeFormatter; use OCP\IGroupManager; +use OCP\IUserManager; use OCP\L10N\IFactory; use OCP\Settings\ISettings; use OCP\Support\Subscription\IRegistry; +use OCP\User\Backend\ICountUsersBackend; use OCP\Util; -use OCP\IUserManager; use Psr\Log\LoggerInterface; class Admin implements ISettings { @@ -64,7 +64,7 @@ class Admin implements ISettings { IRegistry $subscriptionRegistry, IUserManager $userManager, LoggerInterface $logger, - IInitialState $initialState + IInitialState $initialState ) { $this->config = $config; $this->updateChecker = $updateChecker; diff --git a/apps/updatenotification/templates/admin.php b/apps/updatenotification/templates/admin.php index a9bf18b3a4e..6de72628e45 100644 --- a/apps/updatenotification/templates/admin.php +++ b/apps/updatenotification/templates/admin.php @@ -9,6 +9,6 @@ declare(strict_types=1); * later. See the COPYING file. */ \OCP\Util::addScript('updatenotification', 'updatenotification'); - ?> +?> <div id="updatenotification"></div> diff --git a/apps/updatenotification/tests/Settings/AdminTest.php b/apps/updatenotification/tests/Settings/AdminTest.php index 784e56e79ed..bdde25aceca 100644 --- a/apps/updatenotification/tests/Settings/AdminTest.php +++ b/apps/updatenotification/tests/Settings/AdminTest.php @@ -29,9 +29,11 @@ declare(strict_types=1); */ namespace OCA\UpdateNotification\Tests\Settings; +use OC\User\Backend; use OCA\UpdateNotification\Settings\Admin; use OCA\UpdateNotification\UpdateChecker; use OCP\AppFramework\Http\TemplateResponse; +use OCP\AppFramework\Services\IInitialState; use OCP\IConfig; use OCP\IDateTimeFormatter; use OCP\IGroup; @@ -40,11 +42,9 @@ use OCP\IUserManager; use OCP\L10N\IFactory; use OCP\L10N\ILanguageIterator; use OCP\Support\Subscription\IRegistry; -use OCP\UserInterface; use OCP\User\Backend\ICountUsersBackend; -use OCP\AppFramework\Services\IInitialState; +use OCP\UserInterface; use OCP\Util; -use OC\User\Backend; use Psr\Log\LoggerInterface; use Test\TestCase; @@ -84,11 +84,11 @@ class AdminTest extends TestCase { $this->initialState = $this->createMock(IInitialState::class); $this->admin = new Admin( - $this->config, - $this->updateChecker, - $this->groupManager, - $this->dateTimeFormatter, - $this->l10nFactory, + $this->config, + $this->updateChecker, + $this->groupManager, + $this->dateTimeFormatter, + $this->l10nFactory, $this->subscriptionRegistry, $this->userManager, $this->logger, |