Passed
Push — master ( fda6ff...86a3b7 )
by Joas
16:22 queued 12s
created
apps/provisioning_api/lib/Controller/UsersController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
 		$matches = [];
266 266
 		foreach ($userMatches as $phone => $userId) {
267 267
 			// Not using the ICloudIdManager as that would run a search for each contact to find the display name in the address book
268
-			$matches[$normalizedNumberToKey[$phone]] = $userId . '@' . $cloudUrl;
268
+			$matches[$normalizedNumberToKey[$phone]] = $userId.'@'.$cloudUrl;
269 269
 		}
270 270
 
271 271
 		return new DataResponse($matches);
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
 					throw new OCSException('group '.$group.' does not exist', 104);
329 329
 				}
330 330
 				if (!$isAdmin && !$subAdminManager->isSubAdminOfGroup($user, $this->groupManager->get($group))) {
331
-					throw new OCSException('insufficient privileges for group '. $group, 105);
331
+					throw new OCSException('insufficient privileges for group '.$group, 105);
332 332
 				}
333 333
 			}
334 334
 		} else {
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
 				$group = $this->groupManager->get($groupid);
344 344
 				// Check if group exists
345 345
 				if ($group === null) {
346
-					throw new OCSException('Subadmin group does not exist',  102);
346
+					throw new OCSException('Subadmin group does not exist', 102);
347 347
 				}
348 348
 				// Check if trying to make subadmin of admin group
349 349
 				if ($group->getGID() === 'admin') {
@@ -384,11 +384,11 @@  discard block
 block discarded – undo
384 384
 
385 385
 		try {
386 386
 			$newUser = $this->userManager->createUser($userid, $password);
387
-			$this->logger->info('Successful addUser call with userid: ' . $userid, ['app' => 'ocs_api']);
387
+			$this->logger->info('Successful addUser call with userid: '.$userid, ['app' => 'ocs_api']);
388 388
 
389 389
 			foreach ($groups as $group) {
390 390
 				$this->groupManager->get($group)->addUser($newUser);
391
-				$this->logger->info('Added userid ' . $userid . ' to group ' . $group, ['app' => 'ocs_api']);
391
+				$this->logger->info('Added userid '.$userid.' to group '.$group, ['app' => 'ocs_api']);
392 392
 			}
393 393
 			foreach ($subadminGroups as $group) {
394 394
 				$subAdminManager->createSubAdmin($newUser, $group);
@@ -664,7 +664,7 @@  discard block
 block discarded – undo
664 664
 					try {
665 665
 						$this->accountManager->updateUser($targetUser, $userAccount, true);
666 666
 					} catch (\InvalidArgumentException $e) {
667
-						throw new OCSException('Invalid ' . $e->getMessage(), 102);
667
+						throw new OCSException('Invalid '.$e->getMessage(), 102);
668 668
 					}
669 669
 				}
670 670
 				break;
@@ -911,7 +911,7 @@  discard block
 block discarded – undo
911 911
 		} elseif (!$this->groupManager->isAdmin($loggedInUser->getUID())) {
912 912
 			/** @var IGroup[] $subAdminGroups */
913 913
 			$subAdminGroups = $subAdminManager->getSubAdminsGroups($loggedInUser);
914
-			$subAdminGroups = array_map(function (IGroup $subAdminGroup) {
914
+			$subAdminGroups = array_map(function(IGroup $subAdminGroup) {
915 915
 				return $subAdminGroup->getGID();
916 916
 			}, $subAdminGroups);
917 917
 			$userGroups = $this->groupManager->getUserGroupIds($targetUser);
@@ -948,7 +948,7 @@  discard block
 block discarded – undo
948 948
 		}
949 949
 		// Check if group exists
950 950
 		if ($group === null) {
951
-			throw new OCSException('Group does not exist',  102);
951
+			throw new OCSException('Group does not exist', 102);
952 952
 		}
953 953
 		// Check if trying to make subadmin of admin group
954 954
 		if ($group->getGID() === 'admin') {
Please login to merge, or discard this patch.
apps/settings/lib/BackgroundJobs/VerifyUserData.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 	}
113 113
 
114 114
 	protected function run($argument) {
115
-		$try = (int)$argument['try'] + 1;
115
+		$try = (int) $argument['try'] + 1;
116 116
 
117 117
 		switch ($argument['type']) {
118 118
 			case IAccountManager::PROPERTY_WEBSITE:
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 				break;
125 125
 			default:
126 126
 				// no valid type given, no need to retry
127
-				$this->logger->error($argument['type'] . ' is no valid type for user account data.');
127
+				$this->logger->error($argument['type'].' is no valid type for user account data.');
128 128
 				$result = true;
129 129
 		}
130 130
 
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 	protected function verifyWebsite(array $argument) {
143 143
 		$result = false;
144 144
 
145
-		$url = rtrim($argument['data'], '/') . '/.well-known/' . 'CloudIdVerificationCode.txt';
145
+		$url = rtrim($argument['data'], '/').'/.well-known/'.'CloudIdVerificationCode.txt';
146 146
 
147 147
 		$client = $this->httpClientService->newClient();
148 148
 		try {
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 			$user = $this->userManager->get($argument['uid']);
160 160
 			// we don't check a valid user -> give up
161 161
 			if ($user === null) {
162
-				$this->logger->error($argument['uid'] . ' doesn\'t exist, can\'t verify user data.');
162
+				$this->logger->error($argument['uid'].' doesn\'t exist, can\'t verify user data.');
163 163
 				return $result;
164 164
 			}
165 165
 			$userData = $this->accountManager->getUser($user);
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 
195 195
 		// we don't check a valid user -> give up
196 196
 		if ($user === null) {
197
-			$this->logger->info($argument['uid'] . ' doesn\'t exist, can\'t verify user data.');
197
+			$this->logger->info($argument['uid'].' doesn\'t exist, can\'t verify user data.');
198 198
 			return true;
199 199
 		}
200 200
 
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 		try {
234 234
 			$client = $this->httpClientService->newClient();
235 235
 			$response = $client->get(
236
-				$this->lookupServerUrl . '/users?search=' . urlencode($cloudId) . '&exactCloudId=1',
236
+				$this->lookupServerUrl.'/users?search='.urlencode($cloudId).'&exactCloudId=1',
237 237
 				[
238 238
 					'timeout' => 10,
239 239
 					'connect_timeout' => 3,
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
 				'data' => $argument['data'],
266 266
 				'type' => $argument['type'],
267 267
 				'uid' => $argument['uid'],
268
-				'try' => (int)$argument['try'] + 1,
268
+				'try' => (int) $argument['try'] + 1,
269 269
 				'lastRun' => time()
270 270
 			]
271 271
 		);
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
 	 * @return bool
279 279
 	 */
280 280
 	protected function shouldRun(array $argument) {
281
-		$lastRun = (int)$argument['lastRun'];
281
+		$lastRun = (int) $argument['lastRun'];
282 282
 		return ((time() - $lastRun) > $this->interval);
283 283
 	}
284 284
 
Please login to merge, or discard this patch.
apps/settings/lib/Settings/Personal/PersonalInfo.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 	 */
170 170
 	private function getGroups(IUser $user): array {
171 171
 		$groups = array_map(
172
-			static function (IGroup $group) {
172
+			static function(IGroup $group) {
173 173
 				return $group->getDisplayName();
174 174
 			},
175 175
 			$this->groupManager->getUserGroups($user)
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 
234 234
 		$localeCodes = $this->l10nFactory->findAvailableLocales();
235 235
 
236
-		$userLocale = array_filter($localeCodes, function ($value) use ($userLocaleString) {
236
+		$userLocale = array_filter($localeCodes, function($value) use ($userLocaleString) {
237 237
 			return $userLocaleString === $value['code'];
238 238
 		});
239 239
 
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
 			$userLocale = reset($userLocale);
242 242
 		}
243 243
 
244
-		$localesForLanguage = array_filter($localeCodes, function ($localeCode) use ($userLang) {
244
+		$localesForLanguage = array_filter($localeCodes, function($localeCode) use ($userLang) {
245 245
 			return 0 === strpos($localeCode['code'], $userLang);
246 246
 		});
247 247
 
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
 				default:
279 279
 					$message = $this->l->t('Verify');
280 280
 			}
281
-			$messageParameters[$property . 'Message'] = $message;
281
+			$messageParameters[$property.'Message'] = $message;
282 282
 		}
283 283
 		return $messageParameters;
284 284
 	}
Please login to merge, or discard this patch.
lib/private/Repair/NC21/ValidatePhoneNumber.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 		$numUpdated = 0;
67 67
 		$numRemoved = 0;
68 68
 
69
-		$this->userManager->callForSeenUsers(function (IUser $user) use (&$numUpdated, &$numRemoved) {
69
+		$this->userManager->callForSeenUsers(function(IUser $user) use (&$numUpdated, &$numRemoved) {
70 70
 			$account = $this->accountManager->getUser($user);
71 71
 
72 72
 			if ($account[IAccountManager::PROPERTY_PHONE]['value'] !== '') {
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 		});
84 84
 
85 85
 		if ($numRemoved > 0 || $numUpdated > 0) {
86
-			$output->info('Updated ' . $numUpdated . ' entries and cleaned ' . $numRemoved . ' invalid phone numbers');
86
+			$output->info('Updated '.$numUpdated.' entries and cleaned '.$numRemoved.' invalid phone numbers');
87 87
 		}
88 88
 	}
89 89
 }
Please login to merge, or discard this patch.