diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-03-26 09:30:18 +0100 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-03-26 16:34:56 +0100 |
commit | b80ebc96748b45fd2e0ba9323308657c4b00b7ec (patch) | |
tree | ec20e0ffa2f86b9b54939a83a785407319f94559 /apps/settings/lib | |
parent | 62403d0932be7d620c7bdadc6b4e13eb496fcd6f (diff) | |
download | nextcloud-server-b80ebc96748b45fd2e0ba9323308657c4b00b7ec.tar.gz nextcloud-server-b80ebc96748b45fd2e0ba9323308657c4b00b7ec.zip |
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/settings/lib')
6 files changed, 12 insertions, 12 deletions
diff --git a/apps/settings/lib/Controller/AdminSettingsController.php b/apps/settings/lib/Controller/AdminSettingsController.php index acc44501e64..e7b1a27a637 100644 --- a/apps/settings/lib/Controller/AdminSettingsController.php +++ b/apps/settings/lib/Controller/AdminSettingsController.php @@ -101,15 +101,15 @@ class AdminSettingsController extends Controller { $anchor = strtolower($sectionName); $anchor = str_replace(' ', '-', $anchor); - return array( + return [ 'anchor' => $anchor, 'section-name' => $sectionName, 'form' => $form - ); + ]; } - return array( + return [ 'form' => $form - ); + ]; }, $forms); $out = new Template('settings', 'settings/additional'); diff --git a/apps/settings/lib/Controller/AppSettingsController.php b/apps/settings/lib/Controller/AppSettingsController.php index 47067a9fcf5..fc92fe8c775 100644 --- a/apps/settings/lib/Controller/AppSettingsController.php +++ b/apps/settings/lib/Controller/AppSettingsController.php @@ -258,7 +258,7 @@ class AppSettingsController extends Controller { } // fix groups to be an array - $groups = array(); + $groups = []; if (is_string($appData['groups'])) { $groups = json_decode($appData['groups']); } diff --git a/apps/settings/lib/Controller/PersonalSettingsController.php b/apps/settings/lib/Controller/PersonalSettingsController.php index 18719a85652..12d8af3af17 100644 --- a/apps/settings/lib/Controller/PersonalSettingsController.php +++ b/apps/settings/lib/Controller/PersonalSettingsController.php @@ -94,15 +94,15 @@ class PersonalSettingsController extends Controller { $anchor = strtolower($sectionName); $anchor = str_replace(' ', '-', $anchor); - return array( + return [ 'anchor' => $anchor, 'section-name' => $sectionName, 'form' => $form - ); + ]; } - return array( + return [ 'form' => $form - ); + ]; }, $forms); $out = new Template('settings', 'settings/additional'); diff --git a/apps/settings/lib/Controller/UsersController.php b/apps/settings/lib/Controller/UsersController.php index cfbe35eb201..3f6bcd3a46c 100644 --- a/apps/settings/lib/Controller/UsersController.php +++ b/apps/settings/lib/Controller/UsersController.php @@ -226,7 +226,7 @@ class UsersController extends Controller { $languages = $this->l10nFactory->getLanguages(); /* FINAL DATA */ - $serverData = array(); + $serverData = []; // groups $serverData['groups'] = array_merge_recursive($adminGroup, [$disabledUsersGroup], $groups); // Various data diff --git a/apps/settings/lib/Middleware/SubadminMiddleware.php b/apps/settings/lib/Middleware/SubadminMiddleware.php index ab1b6b5c745..ffc507e50e0 100644 --- a/apps/settings/lib/Middleware/SubadminMiddleware.php +++ b/apps/settings/lib/Middleware/SubadminMiddleware.php @@ -82,7 +82,7 @@ class SubadminMiddleware extends Middleware { */ public function afterException($controller, $methodName, \Exception $exception) { if($exception instanceof NotAdminException) { - $response = new TemplateResponse('core', '403', array(), 'guest'); + $response = new TemplateResponse('core', '403', [], 'guest'); $response->setStatus(Http::STATUS_FORBIDDEN); return $response; } diff --git a/apps/settings/lib/Settings/Personal/PersonalInfo.php b/apps/settings/lib/Settings/Personal/PersonalInfo.php index c8d9b3f8128..69363cdd08f 100644 --- a/apps/settings/lib/Settings/Personal/PersonalInfo.php +++ b/apps/settings/lib/Settings/Personal/PersonalInfo.php @@ -220,7 +220,7 @@ class PersonalInfo implements ISettings { } return array_merge( - array('activelanguage' => $userLang), + ['activelanguage' => $userLang], $languages ); } |