diff options
Diffstat (limited to 'apps/settings')
8 files changed, 18 insertions, 18 deletions
diff --git a/apps/settings/lib/AppInfo/Application.php b/apps/settings/lib/AppInfo/Application.php index 230b2377cda..f53a5ddcf51 100644 --- a/apps/settings/lib/AppInfo/Application.php +++ b/apps/settings/lib/AppInfo/Application.php @@ -60,7 +60,7 @@ class Application extends App { /** * @param array $urlParams */ - public function __construct(array $urlParams=[]){ + public function __construct(array $urlParams=[]) { parent::__construct(self::APP_ID, $urlParams); $container = $this->getContainer(); @@ -73,11 +73,11 @@ class Application extends App { * Core class wrappers */ /** FIXME: Remove once OC_User is non-static and mockable */ - $container->registerService('isAdmin', function() { + $container->registerService('isAdmin', function () { return \OC_User::isAdminUser(\OC_User::getUser()); }); /** FIXME: Remove once OC_SubAdmin is non-static and mockable */ - $container->registerService('isSubAdmin', function(IContainer $c) { + $container->registerService('isSubAdmin', function (IContainer $c) { $userObject = \OC::$server->getUserSession()->getUser(); $isSubAdmin = false; if($userObject !== null) { @@ -85,7 +85,7 @@ class Application extends App { } return $isSubAdmin; }); - $container->registerService('userCertificateManager', function(IContainer $c) { + $container->registerService('userCertificateManager', function (IContainer $c) { return $c->query('ServerContainer')->getCertificateManager(); }, false); $container->registerService('systemCertificateManager', function (IContainer $c) { diff --git a/apps/settings/lib/Controller/AppSettingsController.php b/apps/settings/lib/Controller/AppSettingsController.php index e822436702f..f40a8024b6d 100644 --- a/apps/settings/lib/Controller/AppSettingsController.php +++ b/apps/settings/lib/Controller/AppSettingsController.php @@ -247,7 +247,7 @@ class AppSettingsController extends Controller { $dependencyAnalyzer = new DependencyAnalyzer(new Platform($this->config), $this->l10n); // Extend existing app details - $apps = array_map(function($appData) use ($dependencyAnalyzer) { + $apps = array_map(function ($appData) use ($dependencyAnalyzer) { if (isset($appData['appstoreData'])) { $appstoreData = $appData['appstoreData']; $appData['screenshot'] = isset($appstoreData['screenshots'][0]['url']) ? 'https://usercontent.apps.nextcloud.com/' . base64_encode($appstoreData['screenshots'][0]['url']) : ''; diff --git a/apps/settings/lib/Controller/UsersController.php b/apps/settings/lib/Controller/UsersController.php index 395412cbb6f..5a4ebd122f8 100644 --- a/apps/settings/lib/Controller/UsersController.php +++ b/apps/settings/lib/Controller/UsersController.php @@ -184,7 +184,7 @@ class UsersController extends Controller { if(!$isLDAPUsed) { if ($this->isAdmin) { $disabledUsers = $this->userManager->countDisabledUsers(); - $userCount = array_reduce($this->userManager->countUsers(), function($v, $w) { + $userCount = array_reduce($this->userManager->countUsers(), function ($v, $w) { return $v + (int)$w; }, 0); } else { diff --git a/apps/settings/lib/Settings/Personal/PersonalInfo.php b/apps/settings/lib/Settings/Personal/PersonalInfo.php index 3bf1f23d752..e6bc4388359 100644 --- a/apps/settings/lib/Settings/Personal/PersonalInfo.php +++ b/apps/settings/lib/Settings/Personal/PersonalInfo.php @@ -175,7 +175,7 @@ class PersonalInfo implements ISettings { */ private function getGroups(IUser $user) { $groups = array_map( - function(IGroup $group) { + function (IGroup $group) { return $group->getDisplayName(); }, $this->groupManager->getUserGroups($user) @@ -239,7 +239,7 @@ class PersonalInfo implements ISettings { $localeCodes = $this->l10nFactory->findAvailableLocales(); - $userLocale = array_filter($localeCodes, function($value) use ($userLocaleString) { + $userLocale = array_filter($localeCodes, function ($value) use ($userLocaleString) { return $userLocaleString === $value['code']; }); @@ -248,7 +248,7 @@ class PersonalInfo implements ISettings { $userLocale = reset($userLocale); } - $localesForLanguage = array_filter($localeCodes, function($localeCode) use ($userLang) { + $localesForLanguage = array_filter($localeCodes, function ($localeCode) use ($userLang) { return 0 === strpos($localeCode['code'], $userLang); }); diff --git a/apps/settings/tests/Controller/CheckSetupControllerTest.php b/apps/settings/tests/Controller/CheckSetupControllerTest.php index db4e4580693..f00be40b243 100644 --- a/apps/settings/tests/Controller/CheckSetupControllerTest.php +++ b/apps/settings/tests/Controller/CheckSetupControllerTest.php @@ -116,7 +116,7 @@ class CheckSetupControllerTest extends TestCase { ->disableOriginalConstructor()->getMock(); $this->l10n->expects($this->any()) ->method('t') - ->willReturnCallback(function($message, array $replace) { + ->willReturnCallback(function ($message, array $replace) { return vsprintf($message, $replace); }); $this->dispatcher = $this->getMockBuilder(EventDispatcherInterface::class) @@ -513,7 +513,7 @@ class CheckSetupControllerTest extends TestCase { ->willReturn(true); $this->urlGenerator->method('linkToDocs') - ->willReturnCallback(function(string $key): string { + ->willReturnCallback(function (string $key): string { if ($key === 'admin-performance') { return 'http://docs.example.org/server/go.php?to=admin-performance'; } @@ -536,7 +536,7 @@ class CheckSetupControllerTest extends TestCase { }); $this->urlGenerator->method('getAbsoluteURL') - ->willReturnCallback(function(string $url): string { + ->willReturnCallback(function (string $url): string { if ($url === 'index.php/settings/admin') { return 'https://server/index.php/settings/admin'; } @@ -1391,7 +1391,7 @@ Array */ public function testIsMysqlUsedWithoutUTF8MB4(string $db, bool $useUTF8MB4, bool $expected) { $this->config->method('getSystemValue') - ->willReturnCallback(function($key, $default) use ($db, $useUTF8MB4) { + ->willReturnCallback(function ($key, $default) use ($db, $useUTF8MB4) { if ($key === 'dbtype') { return $db; } @@ -1439,7 +1439,7 @@ Array */ public function testIsEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed(string $mode, string $className, bool $expected) { $this->config->method('getSystemValue') - ->willReturnCallback(function($key, $default) use ($mode, $className) { + ->willReturnCallback(function ($key, $default) use ($mode, $className) { if ($key === 'objectstore' && $mode === 'singlebucket') { return ['class' => $className]; } diff --git a/apps/settings/tests/Controller/MailSettingsControllerTest.php b/apps/settings/tests/Controller/MailSettingsControllerTest.php index f0996045006..7d17ac80407 100644 --- a/apps/settings/tests/Controller/MailSettingsControllerTest.php +++ b/apps/settings/tests/Controller/MailSettingsControllerTest.php @@ -160,7 +160,7 @@ class MailSettingsControllerTest extends \Test\TestCase { $this->l->expects($this->any()) ->method('t') - ->willReturnCallback(function($text, $parameters = []) { + ->willReturnCallback(function ($text, $parameters = []) { return vsprintf($text, $parameters); }); $this->userSession diff --git a/apps/settings/tests/Controller/UsersControllerTest.php b/apps/settings/tests/Controller/UsersControllerTest.php index 9253c9d7d2e..65258252016 100644 --- a/apps/settings/tests/Controller/UsersControllerTest.php +++ b/apps/settings/tests/Controller/UsersControllerTest.php @@ -113,7 +113,7 @@ class UsersControllerTest extends \Test\TestCase { $this->encryptionModule = $this->createMock(IEncryptionModule::class); $this->encryptionManager->expects($this->any())->method('getEncryptionModules') - ->willReturn(['encryptionModule' => ['callback' => function() { return $this->encryptionModule;}]]); + ->willReturn(['encryptionModule' => ['callback' => function () { return $this->encryptionModule;}]]); } @@ -540,7 +540,7 @@ class UsersControllerTest extends \Test\TestCase { ->willReturn($encryptionEnabled); $this->encryptionManager->expects($this->any()) ->method('getEncryptionModule') - ->willReturnCallback(function() use ($encryptionModuleLoaded) { + ->willReturnCallback(function () use ($encryptionModuleLoaded) { if ($encryptionModuleLoaded) return $this->encryptionModule; else throw new ModuleDoesNotExistsException(); }); diff --git a/apps/settings/tests/Mailer/NewUserMailHelperTest.php b/apps/settings/tests/Mailer/NewUserMailHelperTest.php index 0c6d26151b1..c32bb601f31 100644 --- a/apps/settings/tests/Mailer/NewUserMailHelperTest.php +++ b/apps/settings/tests/Mailer/NewUserMailHelperTest.php @@ -90,7 +90,7 @@ class NewUserMailHelperTest extends TestCase { $this->config ->expects($this->any()) ->method('getSystemValue') - ->willReturnCallback(function($arg) { + ->willReturnCallback(function ($arg) { switch ($arg) { case 'secret': return 'MyInstanceWideSecret'; |