Completed
Push — master ( 89fdd0...fb17f1 )
by Morris
28:03 queued 12:49
created
apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 		$storedPassword = $share->getPassword();
151 151
 		$authenticated = $this->session->get('public_link_authenticated') === $share->getId() ||
152 152
 			$this->shareManager->checkPassword($share, $password);
153
-		if (!empty($storedPassword) && !$authenticated ) {
153
+		if (!empty($storedPassword) && !$authenticated) {
154 154
 			$response = new JSONResponse(
155 155
 				['message' => 'No permission to access the share'],
156 156
 				Http::STATUS_BAD_REQUEST
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 		$httpClient = $this->clientService->newClient();
199 199
 
200 200
 		try {
201
-			$response = $httpClient->post($remote . '/index.php/apps/federatedfilesharing/createFederatedShare',
201
+			$response = $httpClient->post($remote.'/index.php/apps/federatedfilesharing/createFederatedShare',
202 202
 				[
203 203
 					'body' =>
204 204
 						[
Please login to merge, or discard this patch.
apps/federation/lib/TrustedServers.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
 		$client = $this->httpClientService->newClient();
231 231
 		try {
232 232
 			$result = $client->get(
233
-				$url . '/status.php',
233
+				$url.'/status.php',
234 234
 				[
235 235
 					'timeout' => 3,
236 236
 					'connect_timeout' => 3,
@@ -286,6 +286,6 @@  discard block
 block discarded – undo
286 286
 
287 287
 		}
288 288
 
289
-		return 'https://' . $url;
289
+		return 'https://'.$url;
290 290
 	}
291 291
 }
Please login to merge, or discard this patch.
apps/files_external/lib/Service/StoragesService.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -72,17 +72,17 @@  discard block
 block discarded – undo
72 72
 	}
73 73
 
74 74
 	protected function getStorageConfigFromDBMount(array $mount) {
75
-		$applicableUsers = array_filter($mount['applicable'], function ($applicable) {
75
+		$applicableUsers = array_filter($mount['applicable'], function($applicable) {
76 76
 			return $applicable['type'] === DBConfigService::APPLICABLE_TYPE_USER;
77 77
 		});
78
-		$applicableUsers = array_map(function ($applicable) {
78
+		$applicableUsers = array_map(function($applicable) {
79 79
 			return $applicable['value'];
80 80
 		}, $applicableUsers);
81 81
 
82
-		$applicableGroups = array_filter($mount['applicable'], function ($applicable) {
82
+		$applicableGroups = array_filter($mount['applicable'], function($applicable) {
83 83
 			return $applicable['type'] === DBConfigService::APPLICABLE_TYPE_GROUP;
84 84
 		});
85
-		$applicableGroups = array_map(function ($applicable) {
85
+		$applicableGroups = array_map(function($applicable) {
86 86
 			return $applicable['value'];
87 87
 		}, $applicableGroups);
88 88
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 				$mount['priority']
99 99
 			);
100 100
 			$config->setType($mount['type']);
101
-			$config->setId((int)$mount['mount_id']);
101
+			$config->setId((int) $mount['mount_id']);
102 102
 			return $config;
103 103
 		} catch (\UnexpectedValueException $e) {
104 104
 			// don't die if a storage backend doesn't exist
@@ -126,11 +126,11 @@  discard block
 block discarded – undo
126 126
 	protected function readConfig() {
127 127
 		$mounts = $this->readDBConfig();
128 128
 		$configs = array_map([$this, 'getStorageConfigFromDBMount'], $mounts);
129
-		$configs = array_filter($configs, function ($config) {
129
+		$configs = array_filter($configs, function($config) {
130 130
 			return $config instanceof StorageConfig;
131 131
 		});
132 132
 
133
-		$keys = array_map(function (StorageConfig $config) {
133
+		$keys = array_map(function(StorageConfig $config) {
134 134
 			return $config->getId();
135 135
 		}, $configs);
136 136
 
@@ -149,14 +149,14 @@  discard block
 block discarded – undo
149 149
 		$mount = $this->dbConfig->getMountById($id);
150 150
 
151 151
 		if (!is_array($mount)) {
152
-			throw new NotFoundException('Storage with ID "' . $id . '" not found');
152
+			throw new NotFoundException('Storage with ID "'.$id.'" not found');
153 153
 		}
154 154
 
155 155
 		$config = $this->getStorageConfigFromDBMount($mount);
156 156
 		if ($this->isApplicable($config)) {
157 157
 			return $config;
158 158
 		} else {
159
-			throw new NotFoundException('Storage with ID "' . $id . '" not found');
159
+			throw new NotFoundException('Storage with ID "'.$id.'" not found');
160 160
 		}
161 161
 	}
162 162
 
@@ -379,13 +379,13 @@  discard block
 block discarded – undo
379 379
 		$existingMount = $this->dbConfig->getMountById($id);
380 380
 
381 381
 		if (!is_array($existingMount)) {
382
-			throw new NotFoundException('Storage with ID "' . $id . '" not found while updating storage');
382
+			throw new NotFoundException('Storage with ID "'.$id.'" not found while updating storage');
383 383
 		}
384 384
 
385 385
 		$oldStorage = $this->getStorageConfigFromDBMount($existingMount);
386 386
 
387 387
 		if ($oldStorage->getBackend() instanceof InvalidBackend) {
388
-			throw new NotFoundException('Storage with id "' . $id . '" cannot be edited due to missing backend');
388
+			throw new NotFoundException('Storage with id "'.$id.'" cannot be edited due to missing backend');
389 389
 		}
390 390
 
391 391
 		$removedUsers = array_diff($oldStorage->getApplicableUsers(), $updatedStorage->getApplicableUsers());
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
 		$existingMount = $this->dbConfig->getMountById($id);
463 463
 
464 464
 		if (!is_array($existingMount)) {
465
-			throw new NotFoundException('Storage with ID "' . $id . '" not found');
465
+			throw new NotFoundException('Storage with ID "'.$id.'" not found');
466 466
 		}
467 467
 
468 468
 		$this->dbConfig->removeMount($id);
Please login to merge, or discard this patch.
settings/Controller/AuthSettingsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -201,7 +201,7 @@
 block discarded – undo
201 201
 	 */
202 202
 	public function update($id, array $scope) {
203 203
 		try {
204
-			$token = $this->tokenProvider->getTokenById((string)$id);
204
+			$token = $this->tokenProvider->getTokenById((string) $id);
205 205
 			if ($token->getUID() !== $this->uid) {
206 206
 				throw new InvalidTokenException('User mismatch');
207 207
 			}
Please login to merge, or discard this patch.
lib/private/Template/Base.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 	 * @param \OCP\IL10N $l10n
47 47
 	 * @param Defaults $theme
48 48
 	 */
49
-	public function __construct($template, $requestToken, $l10n, $theme ) {
49
+	public function __construct($template, $requestToken, $l10n, $theme) {
50 50
 		$this->vars = array();
51 51
 		$this->vars['requesttoken'] = $requestToken;
52 52
 		$this->l10n = $l10n;
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	 */
64 64
 	protected function getAppTemplateDirs($theme, $app, $serverRoot, $app_dir) {
65 65
 		// Check if the app is in the app folder or in the root
66
-		if( file_exists($app_dir.'/templates/' )) {
66
+		if (file_exists($app_dir.'/templates/')) {
67 67
 			return [
68 68
 				$serverRoot.'/themes/'.$theme.'/apps/'.$app.'/templates/',
69 69
 				$app_dir.'/templates/',
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	 *
99 99
 	 * If the key existed before, it will be overwritten
100 100
 	 */
101
-	public function assign( $key, $value) {
101
+	public function assign($key, $value) {
102 102
 		$this->vars[$key] = $value;
103 103
 		return true;
104 104
 	}
@@ -113,12 +113,12 @@  discard block
 block discarded – undo
113 113
 	 * exists, the value will be appended. It can be accessed via
114 114
 	 * $_[$key][$position] in the template.
115 115
 	 */
116
-	public function append( $key, $value ) {
117
-		if( array_key_exists( $key, $this->vars )) {
116
+	public function append($key, $value) {
117
+		if (array_key_exists($key, $this->vars)) {
118 118
 			$this->vars[$key][] = $value;
119 119
 		}
120
-		else{
121
-			$this->vars[$key] = array( $value );
120
+		else {
121
+			$this->vars[$key] = array($value);
122 122
 		}
123 123
 	}
124 124
 
@@ -130,10 +130,10 @@  discard block
 block discarded – undo
130 130
 	 */
131 131
 	public function printPage() {
132 132
 		$data = $this->fetchPage();
133
-		if( $data === false ) {
133
+		if ($data === false) {
134 134
 			return false;
135 135
 		}
136
-		else{
136
+		else {
137 137
 			print $data;
138 138
 			return true;
139 139
 		}
@@ -166,8 +166,8 @@  discard block
 block discarded – undo
166 166
 		$l = $this->l10n;
167 167
 		$theme = $this->theme;
168 168
 
169
-		if(!is_null($additionalParams)) {
170
-			$_ = array_merge( $additionalParams, $this->vars );
169
+		if (!is_null($additionalParams)) {
170
+			$_ = array_merge($additionalParams, $this->vars);
171 171
 			foreach ($_ as $var => $value) {
172 172
 				${$var} = $value;
173 173
 			}
Please login to merge, or discard this patch.
apps/workflowengine/lib/Controller/RequestTime.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
 		$timezones = \DateTimeZone::listIdentifiers();
37 37
 
38 38
 		if ($search !== '') {
39
-			$timezones = array_filter($timezones, function ($timezone) use ($search) {
39
+			$timezones = array_filter($timezones, function($timezone) use ($search) {
40 40
 				return stripos($timezone, $search) !== false;
41 41
 			});
42 42
 		}
Please login to merge, or discard this patch.
lib/private/User/Session.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -350,14 +350,14 @@  discard block
 block discarded – undo
350 350
 			throw new LoginException($message);
351 351
 		}
352 352
 
353
-		if($regenerateSessionId) {
353
+		if ($regenerateSessionId) {
354 354
 			$this->session->regenerateId();
355 355
 		}
356 356
 
357 357
 		$this->setUser($user);
358 358
 		$this->setLoginName($loginDetails['loginName']);
359 359
 
360
-		if(isset($loginDetails['token']) && $loginDetails['token'] instanceof IToken) {
360
+		if (isset($loginDetails['token']) && $loginDetails['token'] instanceof IToken) {
361 361
 			$this->setToken($loginDetails['token']->getId());
362 362
 			$this->lockdownManager->setToken($loginDetails['token']);
363 363
 			$firstTimeLogin = false;
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
 			$firstTimeLogin = $user->updateLastLoginTimestamp();
367 367
 		}
368 368
 		$this->manager->emit('\OC\User', 'postLogin', [$user, $loginDetails['password']]);
369
-		if($this->isLoggedIn()) {
369
+		if ($this->isLoggedIn()) {
370 370
 			$this->prepareUserLogin($firstTimeLogin, $regenerateSessionId);
371 371
 			return true;
372 372
 		}
@@ -408,13 +408,13 @@  discard block
 block discarded – undo
408 408
 		}
409 409
 
410 410
 		// Try to login with this username and password
411
-		if (!$this->login($user, $password) ) {
411
+		if (!$this->login($user, $password)) {
412 412
 
413 413
 			// Failed, maybe the user used their email address
414 414
 			$users = $this->manager->getByEmail($user);
415 415
 			if (!(\count($users) === 1 && $this->login($users[0]->getUID(), $password))) {
416 416
 
417
-				$this->logger->warning('Login failed: \'' . $user . '\' (Remote IP: \'' . \OC::$server->getRequest()->getRemoteAddress() . '\')', ['app' => 'core']);
417
+				$this->logger->warning('Login failed: \''.$user.'\' (Remote IP: \''.\OC::$server->getRequest()->getRemoteAddress().'\')', ['app' => 'core']);
418 418
 
419 419
 				$throttler->registerAttempt('login', $request->getRemoteAddress(), ['uid' => $user]);
420 420
 				if ($currentDelay === 0) {
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
 
427 427
 		if ($isTokenPassword) {
428 428
 			$this->session->set('app_password', $password);
429
-		} else if($this->supportsCookies($request)) {
429
+		} else if ($this->supportsCookies($request)) {
430 430
 			// Password login, but cookies supported -> create (browser) session token
431 431
 			$this->createSessionToken($request, $this->getUser()->getUID(), $user, $password);
432 432
 		}
@@ -506,7 +506,7 @@  discard block
 block discarded – undo
506 506
 			}
507 507
 
508 508
 			// trigger any other initialization
509
-			\OC::$server->getEventDispatcher()->dispatch(IUser::class . '::firstLogin', new GenericEvent($this->getUser()));
509
+			\OC::$server->getEventDispatcher()->dispatch(IUser::class.'::firstLogin', new GenericEvent($this->getUser()));
510 510
 		}
511 511
 	}
512 512
 
@@ -666,7 +666,7 @@  discard block
 block discarded – undo
666 666
 	private function checkTokenCredentials(IToken $dbToken, $token) {
667 667
 		// Check whether login credentials are still valid and the user was not disabled
668 668
 		// This check is performed each 5 minutes
669
-		$lastCheck = $dbToken->getLastCheck() ? : 0;
669
+		$lastCheck = $dbToken->getLastCheck() ?: 0;
670 670
 		$now = $this->timeFactory->getTime();
671 671
 		if ($lastCheck > ($now - 60 * 5)) {
672 672
 			// Checked performed recently, nothing to do now
@@ -756,7 +756,7 @@  discard block
 block discarded – undo
756 756
 		if (!$this->loginWithToken($token)) {
757 757
 			return false;
758 758
 		}
759
-		if(!$this->validateToken($token)) {
759
+		if (!$this->validateToken($token)) {
760 760
 			return false;
761 761
 		}
762 762
 		return true;
@@ -887,9 +887,9 @@  discard block
 block discarded – undo
887 887
 		setcookie('nc_session_id', '', $this->timeFactory->getTime() - 3600, OC::$WEBROOT, '', $secureCookie, true);
888 888
 		// old cookies might be stored under /webroot/ instead of /webroot
889 889
 		// and Firefox doesn't like it!
890
-		setcookie('nc_username', '', $this->timeFactory->getTime() - 3600, OC::$WEBROOT . '/', '', $secureCookie, true);
891
-		setcookie('nc_token', '', $this->timeFactory->getTime() - 3600, OC::$WEBROOT . '/', '', $secureCookie, true);
892
-		setcookie('nc_session_id', '', $this->timeFactory->getTime() - 3600, OC::$WEBROOT . '/', '', $secureCookie, true);
890
+		setcookie('nc_username', '', $this->timeFactory->getTime() - 3600, OC::$WEBROOT.'/', '', $secureCookie, true);
891
+		setcookie('nc_token', '', $this->timeFactory->getTime() - 3600, OC::$WEBROOT.'/', '', $secureCookie, true);
892
+		setcookie('nc_session_id', '', $this->timeFactory->getTime() - 3600, OC::$WEBROOT.'/', '', $secureCookie, true);
893 893
 	}
894 894
 
895 895
 	/**
Please login to merge, or discard this patch.
core/Command/Integrity/CheckApp.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,10 +63,10 @@
 block discarded – undo
63 63
 	 */
64 64
 	protected function execute(InputInterface $input, OutputInterface $output) {
65 65
 		$appid = $input->getArgument('appid');
66
-		$path = (string)$input->getOption('path');
66
+		$path = (string) $input->getOption('path');
67 67
 		$result = $this->checker->verifyAppSignature($appid, $path);
68 68
 		$this->writeArrayInOutputFormat($input, $output, $result);
69
-		if (count($result)>0){
69
+		if (count($result) > 0) {
70 70
 			return 1;
71 71
 		}
72 72
 	}
Please login to merge, or discard this patch.
lib/public/Collaboration/Collaborators/SearchResultType.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -58,13 +58,13 @@
 block discarded – undo
58 58
 	 * @since 13.0.0
59 59
 	 */
60 60
 	protected function getValidatedType($type) {
61
-		$type = trim((string)$type);
61
+		$type = trim((string) $type);
62 62
 
63
-		if($type === '') {
63
+		if ($type === '') {
64 64
 			throw new \InvalidArgumentException('Type must not be empty');
65 65
 		}
66 66
 
67
-		if($type === 'exact') {
67
+		if ($type === 'exact') {
68 68
 			throw new \InvalidArgumentException('Provided type is a reserved word');
69 69
 		}
70 70
 
Please login to merge, or discard this patch.