Completed
Push — master ( 6895ba...ed9b63 )
by
unknown
31:37
created
apps/settings/lib/Controller/UsersController.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 		];
146 146
 
147 147
 		if (!$isLDAPUsed && $this->appManager->isEnabledForUser('user_ldap')) {
148
-			$isLDAPUsed = (bool)array_reduce($this->userManager->getBackends(), function ($ldapFound, $backend) {
148
+			$isLDAPUsed = (bool) array_reduce($this->userManager->getBackends(), function($ldapFound, $backend) {
149 149
 				return $ldapFound || $backend instanceof User_Proxy;
150 150
 			});
151 151
 		}
@@ -156,12 +156,12 @@  discard block
 block discarded – undo
156 156
 		if (!$isLDAPUsed) {
157 157
 			if ($isAdmin || $isDelegatedAdmin) {
158 158
 				$disabledUsers = $this->userManager->countDisabledUsers();
159
-				$userCount = array_reduce($this->userManager->countUsers(), function ($v, $w) {
160
-					return $v + (int)$w;
159
+				$userCount = array_reduce($this->userManager->countUsers(), function($v, $w) {
160
+					return $v + (int) $w;
161 161
 				}, 0);
162 162
 			} else {
163 163
 				// User is subadmin !
164
-				[$userCount,$disabledUsers] = $this->userManager->countUsersAndDisabledUsersOfGroups($groupsInfo->getGroups(), self::COUNT_LIMIT_FOR_SUBADMINS);
164
+				[$userCount, $disabledUsers] = $this->userManager->countUsersAndDisabledUsersOfGroups($groupsInfo->getGroups(), self::COUNT_LIMIT_FOR_SUBADMINS);
165 165
 			}
166 166
 
167 167
 			if ($disabledUsers > 0) {
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
 		$serverData['isDelegatedAdmin'] = $isDelegatedAdmin;
210 210
 		$serverData['sortGroups'] = $forceSortGroupByName
211 211
 			? MetaData::SORT_GROUPNAME
212
-			: (int)$this->config->getAppValue('core', 'group.sortBy', (string)MetaData::SORT_USERCOUNT);
212
+			: (int) $this->config->getAppValue('core', 'group.sortBy', (string) MetaData::SORT_USERCOUNT);
213 213
 		$serverData['forceSortGroupByName'] = $forceSortGroupByName;
214 214
 		$serverData['quotaPreset'] = $quotaPreset;
215 215
 		$serverData['allowUnlimitedQuota'] = $allowUnlimitedQuota;
@@ -429,7 +429,7 @@  discard block
 block discarded – undo
429 429
 				],
430 430
 				Http::STATUS_OK
431 431
 			);
432
-		} catch (ForbiddenException|InvalidArgumentException|PropertyDoesNotExistException $e) {
432
+		} catch (ForbiddenException | InvalidArgumentException | PropertyDoesNotExistException $e) {
433 433
 			return new DataResponse([
434 434
 				'status' => 'error',
435 435
 				'data' => [
@@ -456,7 +456,7 @@  discard block
 block discarded – undo
456 456
 		}
457 457
 
458 458
 		$oldEmailAddress = $userAccount->getUser()->getSystemEMailAddress();
459
-		$oldEmailAddress = strtolower((string)$oldEmailAddress);
459
+		$oldEmailAddress = strtolower((string) $oldEmailAddress);
460 460
 		if ($oldEmailAddress !== strtolower($userAccount->getProperty(IAccountManager::PROPERTY_EMAIL)->getValue())) {
461 461
 			// this is the only permission a backend provides and is also used
462 462
 			// for the permission of setting a email address
@@ -499,11 +499,11 @@  discard block
 block discarded – undo
499 499
 
500 500
 		$userAccount = $this->accountManager->getAccount($user);
501 501
 		$cloudId = $user->getCloudId();
502
-		$message = 'Use my Federated Cloud ID to share with me: ' . $cloudId;
502
+		$message = 'Use my Federated Cloud ID to share with me: '.$cloudId;
503 503
 		$signature = $this->signMessage($user, $message);
504 504
 
505
-		$code = $message . ' ' . $signature;
506
-		$codeMd5 = $message . ' ' . md5($signature);
505
+		$code = $message.' '.$signature;
506
+		$codeMd5 = $message.' '.md5($signature);
507 507
 
508 508
 		switch ($account) {
509 509
 			case 'verify-twitter':
Please login to merge, or discard this patch.
apps/settings/lib/Mailer/NewUserMailHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,9 +57,9 @@
 block discarded – undo
57 57
 				21,
58 58
 				ISecureRandom::CHAR_ALPHANUMERIC
59 59
 			);
60
-			$tokenValue = $this->timeFactory->getTime() . ':' . $token;
60
+			$tokenValue = $this->timeFactory->getTime().':'.$token;
61 61
 			$mailAddress = ($user->getEMailAddress() !== null) ? $user->getEMailAddress() : '';
62
-			$encryptedValue = $this->crypto->encrypt($tokenValue, $mailAddress . $this->config->getSystemValue('secret'));
62
+			$encryptedValue = $this->crypto->encrypt($tokenValue, $mailAddress.$this->config->getSystemValue('secret'));
63 63
 			$this->config->setUserValue($user->getUID(), 'core', 'lostpassword', $encryptedValue);
64 64
 			$link = $this->urlGenerator->linkToRouteAbsolute('core.lost.resetform', ['userId' => $user->getUID(), 'token' => $token]);
65 65
 		} else {
Please login to merge, or discard this patch.
apps/settings/lib/Command/AdminDelegation/Remove.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 /**
5 5
  * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
6 6
  * SPDX-License-Identifier: AGPL-3.0-or-later
@@ -43,12 +43,12 @@  discard block
 block discarded – undo
43 43
 		foreach ($groups as $group) {
44 44
 			if ($group->getGroupId() === $groupId) {
45 45
 				$this->authorizedGroupService->delete($group->getId());
46
-				$io->success('Removed delegation of ' . $settingClass . ' to ' . $groupId . '.');
46
+				$io->success('Removed delegation of '.$settingClass.' to '.$groupId.'.');
47 47
 				return 0;
48 48
 			}
49 49
 		}
50 50
 
51
-		$io->success('Group ' . $groupId . ' didn’t have delegation for ' . $settingClass . '.');
51
+		$io->success('Group '.$groupId.' didn’t have delegation for '.$settingClass.'.');
52 52
 
53 53
 		return 0;
54 54
 	}
Please login to merge, or discard this patch.
apps/settings/lib/Command/AdminDelegation/Add.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 /**
5 5
  * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
6 6
  * SPDX-License-Identifier: AGPL-3.0-or-later
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 	protected function execute(InputInterface $input, OutputInterface $output): int {
40 40
 		$io = new SymfonyStyle($input, $output);
41 41
 		$settingClass = $input->getArgument('settingClass');
42
-		if (!in_array(IDelegatedSettings::class, (array)class_implements($settingClass), true)) {
42
+		if (!in_array(IDelegatedSettings::class, (array) class_implements($settingClass), true)) {
43 43
 			$io->error('The specified class isn’t a valid delegated setting.');
44 44
 			return 2;
45 45
 		}
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 
53 53
 		$this->authorizedGroupService->create($groupId, $settingClass);
54 54
 
55
-		$io->success('Administration of ' . $settingClass . ' delegated to ' . $groupId . '.');
55
+		$io->success('Administration of '.$settingClass.' delegated to '.$groupId.'.');
56 56
 
57 57
 		return 0;
58 58
 	}
Please login to merge, or discard this patch.
apps/settings/lib/Command/AdminDelegation/Show.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 /**
5 5
  * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
6 6
  * SPDX-License-Identifier: AGPL-3.0-or-later
@@ -47,8 +47,8 @@  discard block
 block discarded – undo
47 47
 					continue;
48 48
 				}
49 49
 
50
-				$io->section('Section: ' . $section->getID());
51
-				$io->table($headers, array_map(function (IDelegatedSettings $setting) use ($section) {
50
+				$io->section('Section: '.$section->getID());
51
+				$io->table($headers, array_map(function(IDelegatedSettings $setting) use ($section) {
52 52
 					$className = get_class($setting);
53 53
 					$groups = array_map(
54 54
 						static fn (AuthorizedGroup $group) => $group->getGroupId(),
Please login to merge, or discard this patch.
apps/settings/lib/AppInfo/Application.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -131,18 +131,18 @@
 block discarded – undo
131 131
 		/**
132 132
 		 * Core class wrappers
133 133
 		 */
134
-		$context->registerService(IProvider::class, function (IAppContainer $appContainer) {
134
+		$context->registerService(IProvider::class, function(IAppContainer $appContainer) {
135 135
 			/** @var IServerContainer $serverContainer */
136 136
 			$serverContainer = $appContainer->query(IServerContainer::class);
137 137
 			return $serverContainer->query(IProvider::class);
138 138
 		});
139
-		$context->registerService(IManager::class, function (IAppContainer $appContainer) {
139
+		$context->registerService(IManager::class, function(IAppContainer $appContainer) {
140 140
 			/** @var IServerContainer $serverContainer */
141 141
 			$serverContainer = $appContainer->query(IServerContainer::class);
142 142
 			return $serverContainer->getSettingsManager();
143 143
 		});
144 144
 
145
-		$context->registerService(NewUserMailHelper::class, function (IAppContainer $appContainer) {
145
+		$context->registerService(NewUserMailHelper::class, function(IAppContainer $appContainer) {
146 146
 			/** @var Server $server */
147 147
 			$server = $appContainer->query(IServerContainer::class);
148 148
 			/** @var Defaults $defaults */
Please login to merge, or discard this patch.
apps/settings/lib/SetupChecks/CronErrors.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
 			return SetupResult::error(
36 36
 				$this->l10n->t(
37 37
 					"It was not possible to execute the cron job via CLI. The following technical errors have appeared:\n%s",
38
-					implode("\n", array_map(fn (array $error) => '- ' . $error['error'] . ' ' . $error['hint'], $errors))
38
+					implode("\n", array_map(fn (array $error) => '- '.$error['error'].' '.$error['hint'], $errors))
39 39
 				)
40 40
 			);
41 41
 		} else {
Please login to merge, or discard this patch.
apps/settings/lib/SetupChecks/AppDirsWithDifferentOwner.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
 
62 62
 		foreach ($appsDir as $fileInfo) {
63 63
 			if ($fileInfo->isDir() && !$fileInfo->isDot()) {
64
-				$absAppPath = $appsPath . DIRECTORY_SEPARATOR . $fileInfo->getFilename();
64
+				$absAppPath = $appsPath.DIRECTORY_SEPARATOR.$fileInfo->getFilename();
65 65
 				$appDirUser = fileowner($absAppPath);
66 66
 				if ($appDirUser !== $currentUser) {
67 67
 					$appDirsWithDifferentOwner[] = $absAppPath;
Please login to merge, or discard this patch.
apps/settings/lib/SetupChecks/PhpModules.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
 			$moduleList = implode(
76 76
 				"\n",
77 77
 				array_map(
78
-					fn (string $module) => '- ' . $module . ' ' . $this->getRecommendedModuleDescription($module),
78
+					fn (string $module) => '- '.$module.' '.$this->getRecommendedModuleDescription($module),
79 79
 					$missingRecommendedModules
80 80
 				)
81 81
 			);
Please login to merge, or discard this patch.