Passed
Push — master ( 83674f...c92e64 )
by Roeland
10:11 queued 11s
created
apps/provisioning_api/lib/Controller/AppsController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -62,11 +62,11 @@  discard block
 block discarded – undo
62 62
 	public function getApps(string $filter = null): DataResponse {
63 63
 		$apps = (new OC_App())->listAllApps();
64 64
 		$list = [];
65
-		foreach($apps as $app) {
65
+		foreach ($apps as $app) {
66 66
 			$list[] = $app['id'];
67 67
 		}
68
-		if($filter){
69
-			switch($filter){
68
+		if ($filter) {
69
+			switch ($filter) {
70 70
 				case 'enabled':
71 71
 					return new DataResponse(['apps' => \OC_App::getEnabledApps()]);
72 72
 					break;
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 	 */
92 92
 	public function getAppInfo(string $app): DataResponse {
93 93
 		$info = \OCP\App::getAppInfo($app);
94
-		if(!is_null($info)) {
94
+		if (!is_null($info)) {
95 95
 			return new DataResponse(OC_App::getAppInfo($app));
96 96
 		}
97 97
 
Please login to merge, or discard this patch.
apps/files_external/lib/Controller/ApiController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
 		$user = $this->userSession->getUser()->getUID();
100 100
 
101 101
 		$mounts = \OC_Mount_Config::getAbsoluteMountPoints($user);
102
-		foreach($mounts as $mountPoint => $mount) {
102
+		foreach ($mounts as $mountPoint => $mount) {
103 103
 			$entries[] = $this->formatMount($mountPoint, $mount);
104 104
 		}
105 105
 
Please login to merge, or discard this patch.
lib/private/Log.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 		// interpolate $message as defined in PSR-3
211 211
 		$replace = [];
212 212
 		foreach ($context as $key => $val) {
213
-			$replace['{' . $key . '}'] = $val;
213
+			$replace['{'.$key.'}'] = $val;
214 214
 		}
215 215
 		$message = strtr($message, $replace);
216 216
 
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
 	}
318 318
 
319 319
 	public function getLogPath():string {
320
-		if($this->logger instanceof IFileBased) {
320
+		if ($this->logger instanceof IFileBased) {
321 321
 			return $this->logger->getLogFilePath();
322 322
 		}
323 323
 		throw new \RuntimeException('Log implementation has no path');
Please login to merge, or discard this patch.
apps/files_sharing/lib/Controller/ShareesAPIController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -121,13 +121,13 @@  discard block
 block discarded – undo
121 121
 	public function search(string $search = '', string $itemType = null, int $page = 1, int $perPage = 200, $shareType = null, bool $lookup = true): DataResponse {
122 122
 
123 123
 		// only search for string larger than a given threshold
124
-		$threshold = (int)$this->config->getSystemValue('sharing.minSearchStringLength', 0);
124
+		$threshold = (int) $this->config->getSystemValue('sharing.minSearchStringLength', 0);
125 125
 		if (strlen($search) < $threshold) {
126 126
 			return new DataResponse($this->result);
127 127
 		}
128 128
 
129 129
 		// never return more than the max. number of results configured in the config.php
130
-		$maxResults = (int)$this->config->getSystemValue('sharing.maxAutocompleteResults', 0);
130
+		$maxResults = (int) $this->config->getSystemValue('sharing.maxAutocompleteResults', 0);
131 131
 		if ($maxResults > 0) {
132 132
 			$perPage = min($perPage, $maxResults);
133 133
 		}
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 		list($result, $hasMoreResults) = $this->collaboratorSearch->search($search, $shareTypes, $lookup, $this->limit, $this->offset);
183 183
 
184 184
 		// extra treatment for 'exact' subarray, with a single merge expected keys might be lost
185
-		if(isset($result['exact'])) {
185
+		if (isset($result['exact'])) {
186 186
 			$result['exact'] = array_merge($this->result['exact'], $result['exact']);
187 187
 		}
188 188
 		$this->result = array_merge($this->result, $result);
@@ -226,12 +226,12 @@  discard block
 block discarded – undo
226 226
 	 */
227 227
 	protected function getPaginationLink(int $page, array $params): string {
228 228
 		if ($this->isV2()) {
229
-			$url = $this->urlGenerator->getAbsoluteURL('/ocs/v2.php/apps/files_sharing/api/v1/sharees') . '?';
229
+			$url = $this->urlGenerator->getAbsoluteURL('/ocs/v2.php/apps/files_sharing/api/v1/sharees').'?';
230 230
 		} else {
231
-			$url = $this->urlGenerator->getAbsoluteURL('/ocs/v1.php/apps/files_sharing/api/v1/sharees') . '?';
231
+			$url = $this->urlGenerator->getAbsoluteURL('/ocs/v1.php/apps/files_sharing/api/v1/sharees').'?';
232 232
 		}
233 233
 		$params['page'] = $page + 1;
234
-		return '<' . $url . http_build_query($params) . '>; rel="next"';
234
+		return '<'.$url.http_build_query($params).'>; rel="next"';
235 235
 	}
236 236
 
237 237
 	/**
Please login to merge, or discard this patch.
apps/federation/lib/BackgroundJob/RequestSharedSecret.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 	protected function run($argument) {
155 155
 
156 156
 		$target = $argument['url'];
157
-		$created = isset($argument['created']) ? (int)$argument['created'] : $this->timeFactory->getTime();
157
+		$created = isset($argument['created']) ? (int) $argument['created'] : $this->timeFactory->getTime();
158 158
 		$currentTime = $this->timeFactory->getTime();
159 159
 		$source = $this->urlGenerator->getAbsoluteURL('/');
160 160
 		$source = rtrim($source, '/');
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 		$endPoint = isset($endPoints['shared-secret']) ? $endPoints['shared-secret'] : $this->defaultEndPoint;
173 173
 
174 174
 		// make sure that we have a well formated url
175
-		$url = rtrim($target, '/') . '/' . trim($endPoint, '/');
175
+		$url = rtrim($target, '/').'/'.trim($endPoint, '/');
176 176
 
177 177
 		try {
178 178
 			$result = $this->httpClient->post(
@@ -193,16 +193,16 @@  discard block
 block discarded – undo
193 193
 		} catch (ClientException $e) {
194 194
 			$status = $e->getCode();
195 195
 			if ($status === Http::STATUS_FORBIDDEN) {
196
-				$this->logger->info($target . ' refused to ask for a shared secret.', ['app' => 'federation']);
196
+				$this->logger->info($target.' refused to ask for a shared secret.', ['app' => 'federation']);
197 197
 			} else {
198
-				$this->logger->info($target . ' responded with a ' . $status . ' containing: ' . $e->getMessage(), ['app' => 'federation']);
198
+				$this->logger->info($target.' responded with a '.$status.' containing: '.$e->getMessage(), ['app' => 'federation']);
199 199
 			}
200 200
 		} catch (RequestException $e) {
201 201
 			$status = -1; // There is no status code if we could not connect
202
-			$this->logger->info('Could not connect to ' . $target, ['app' => 'federation']);
202
+			$this->logger->info('Could not connect to '.$target, ['app' => 'federation']);
203 203
 		} catch (RingException $e) {
204 204
 			$status = -1; // There is no status code if we could not connect
205
-			$this->logger->info('Could not connect to ' . $target, ['app' => 'federation']);
205
+			$this->logger->info('Could not connect to '.$target, ['app' => 'federation']);
206 206
 		} catch (\Exception $e) {
207 207
 			$status = Http::STATUS_INTERNAL_SERVER_ERROR;
208 208
 			$this->logger->logException($e, ['app' => 'federation']);
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 	 */
226 226
 	protected function reAddJob(array $argument) {
227 227
 		$url = $argument['url'];
228
-		$created = isset($argument['created']) ? (int)$argument['created'] : $this->timeFactory->getTime();
228
+		$created = isset($argument['created']) ? (int) $argument['created'] : $this->timeFactory->getTime();
229 229
 		$token = $argument['token'];
230 230
 
231 231
 		$this->jobList->add(
Please login to merge, or discard this patch.
apps/user_ldap/lib/Jobs/UpdateGroups.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -50,14 +50,14 @@  discard block
 block discarded – undo
50 50
 
51 51
 	static private $groupBE;
52 52
 
53
-	public function __construct(){
53
+	public function __construct() {
54 54
 		$this->interval = self::getRefreshInterval();
55 55
 	}
56 56
 
57 57
 	/**
58 58
 	 * @param mixed $argument
59 59
 	 */
60
-	public function run($argument){
60
+	public function run($argument) {
61 61
 		self::updateGroups();
62 62
 	}
63 63
 
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 		$knownGroups = array_keys(self::getKnownGroups());
68 68
 		$actualGroups = self::getGroupBE()->getGroups();
69 69
 
70
-		if(empty($actualGroups) && empty($knownGroups)) {
70
+		if (empty($actualGroups) && empty($knownGroups)) {
71 71
 			\OCP\Util::writeLog('user_ldap',
72 72
 				'bgJ "updateGroups" – groups do not seem to be configured properly, aborting.',
73 73
 				ILogger::INFO);
@@ -99,26 +99,26 @@  discard block
 block discarded – undo
99 99
 			SET `owncloudusers` = ?
100 100
 			WHERE `owncloudname` = ?
101 101
 		');
102
-		foreach($groups as $group) {
102
+		foreach ($groups as $group) {
103 103
 			//we assume, that self::$groupsFromDB has been retrieved already
104 104
 			$knownUsers = unserialize(self::$groupsFromDB[$group]['owncloudusers']);
105 105
 			$actualUsers = self::getGroupBE()->usersInGroup($group);
106 106
 			$hasChanged = false;
107
-			foreach(array_diff($knownUsers, $actualUsers) as $removedUser) {
107
+			foreach (array_diff($knownUsers, $actualUsers) as $removedUser) {
108 108
 				\OCP\Util::emitHook('OC_User', 'post_removeFromGroup', array('uid' => $removedUser, 'gid' => $group));
109 109
 				\OCP\Util::writeLog('user_ldap',
110 110
 				'bgJ "updateGroups" – "'.$removedUser.'" removed from "'.$group.'".',
111 111
 					ILogger::INFO);
112 112
 				$hasChanged = true;
113 113
 			}
114
-			foreach(array_diff($actualUsers, $knownUsers) as $addedUser) {
114
+			foreach (array_diff($actualUsers, $knownUsers) as $addedUser) {
115 115
 				\OCP\Util::emitHook('OC_User', 'post_addToGroup', array('uid' => $addedUser, 'gid' => $group));
116 116
 				\OCP\Util::writeLog('user_ldap',
117 117
 				'bgJ "updateGroups" – "'.$addedUser.'" added to "'.$group.'".',
118 118
 					ILogger::INFO);
119 119
 				$hasChanged = true;
120 120
 			}
121
-			if($hasChanged) {
121
+			if ($hasChanged) {
122 122
 				$query->execute(array(serialize($actualUsers), $group));
123 123
 			}
124 124
 		}
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 			INTO `*PREFIX*ldap_group_members` (`owncloudname`, `owncloudusers`)
138 138
 			VALUES (?, ?)
139 139
 		');
140
-		foreach($createdGroups as $createdGroup) {
140
+		foreach ($createdGroups as $createdGroup) {
141 141
 			\OCP\Util::writeLog('user_ldap',
142 142
 				'bgJ "updateGroups" – new group "'.$createdGroup.'" found.',
143 143
 				ILogger::INFO);
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 			FROM `*PREFIX*ldap_group_members`
160 160
 			WHERE `owncloudname` = ?
161 161
 		');
162
-		foreach($removedGroups as $removedGroup) {
162
+		foreach ($removedGroups as $removedGroup) {
163 163
 			\OCP\Util::writeLog('user_ldap',
164 164
 				'bgJ "updateGroups" – group "'.$removedGroup.'" was removed.',
165 165
 				ILogger::INFO);
@@ -174,13 +174,13 @@  discard block
 block discarded – undo
174 174
 	 * @return \OCA\User_LDAP\Group_LDAP|\OCA\User_LDAP\Group_Proxy
175 175
 	 */
176 176
 	static private function getGroupBE() {
177
-		if(!is_null(self::$groupBE)) {
177
+		if (!is_null(self::$groupBE)) {
178 178
 			return self::$groupBE;
179 179
 		}
180 180
 		$helper = new Helper(\OC::$server->getConfig());
181 181
 		$configPrefixes = $helper->getServerConfigurationPrefixes(true);
182 182
 		$ldapWrapper = new LDAP();
183
-		if(count($configPrefixes) === 1) {
183
+		if (count($configPrefixes) === 1) {
184 184
 			//avoid the proxy when there is only one LDAP server configured
185 185
 			$dbc = \OC::$server->getDatabaseConnection();
186 186
 			$userManager = new Manager(
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 	 * @return array
211 211
 	 */
212 212
 	static private function getKnownGroups() {
213
-		if(is_array(self::$groupsFromDB)) {
213
+		if (is_array(self::$groupsFromDB)) {
214 214
 			return self::$groupsFromDB;
215 215
 		}
216 216
 		$query = \OC_DB::prepare('
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
 		');
220 220
 		$result = $query->execute()->fetchAll();
221 221
 		self::$groupsFromDB = array();
222
-		foreach($result as $dataset) {
222
+		foreach ($result as $dataset) {
223 223
 			self::$groupsFromDB[$dataset['owncloudname']] = $dataset;
224 224
 		}
225 225
 
Please login to merge, or discard this patch.
apps/encryption/lib/KeyManager.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 		$this->recoveryKeyId = $this->config->getAppValue('encryption',
129 129
 			'recoveryKeyId');
130 130
 		if (empty($this->recoveryKeyId)) {
131
-			$this->recoveryKeyId = 'recoveryKey_' . substr(md5(time()), 0, 8);
131
+			$this->recoveryKeyId = 'recoveryKey_'.substr(md5(time()), 0, 8);
132 132
 			$this->config->setAppValue('encryption',
133 133
 				'recoveryKeyId',
134 134
 				$this->recoveryKeyId);
@@ -137,14 +137,14 @@  discard block
 block discarded – undo
137 137
 		$this->publicShareKeyId = $this->config->getAppValue('encryption',
138 138
 			'publicShareKeyId');
139 139
 		if (empty($this->publicShareKeyId)) {
140
-			$this->publicShareKeyId = 'pubShare_' . substr(md5(time()), 0, 8);
140
+			$this->publicShareKeyId = 'pubShare_'.substr(md5(time()), 0, 8);
141 141
 			$this->config->setAppValue('encryption', 'publicShareKeyId', $this->publicShareKeyId);
142 142
 		}
143 143
 
144 144
 		$this->masterKeyId = $this->config->getAppValue('encryption',
145 145
 			'masterKeyId');
146 146
 		if (empty($this->masterKeyId)) {
147
-			$this->masterKeyId = 'master_' . substr(md5(time()), 0, 8);
147
+			$this->masterKeyId = 'master_'.substr(md5(time()), 0, 8);
148 148
 			$this->config->setAppValue('encryption', 'masterKeyId', $this->masterKeyId);
149 149
 		}
150 150
 
@@ -162,13 +162,13 @@  discard block
 block discarded – undo
162 162
 
163 163
 			// Save public key
164 164
 			$this->keyStorage->setSystemUserKey(
165
-				$this->publicShareKeyId . '.publicKey', $keyPair['publicKey'],
165
+				$this->publicShareKeyId.'.publicKey', $keyPair['publicKey'],
166 166
 				Encryption::ID);
167 167
 
168 168
 			// Encrypt private key empty passphrase
169 169
 			$encryptedKey = $this->crypt->encryptPrivateKey($keyPair['privateKey'], '');
170 170
 			$header = $this->crypt->generateHeader();
171
-			$this->setSystemPrivateKey($this->publicShareKeyId, $header . $encryptedKey);
171
+			$this->setSystemPrivateKey($this->publicShareKeyId, $header.$encryptedKey);
172 172
 		}
173 173
 	}
174 174
 
@@ -187,13 +187,13 @@  discard block
 block discarded – undo
187 187
 
188 188
 			// Save public key
189 189
 			$this->keyStorage->setSystemUserKey(
190
-				$this->masterKeyId . '.publicKey', $keyPair['publicKey'],
190
+				$this->masterKeyId.'.publicKey', $keyPair['publicKey'],
191 191
 				Encryption::ID);
192 192
 
193 193
 			// Encrypt private key with system password
194 194
 			$encryptedKey = $this->crypt->encryptPrivateKey($keyPair['privateKey'], $this->getMasterKeyPassword(), $this->masterKeyId);
195 195
 			$header = $this->crypt->generateHeader();
196
-			$this->setSystemPrivateKey($this->masterKeyId, $header . $encryptedKey);
196
+			$this->setSystemPrivateKey($this->masterKeyId, $header.$encryptedKey);
197 197
 		}
198 198
 
199 199
 		if (!$this->session->isPrivateKeySet()) {
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
 	 * @return string
221 221
 	 */
222 222
 	public function getRecoveryKey() {
223
-		return $this->keyStorage->getSystemUserKey($this->recoveryKeyId . '.publicKey', Encryption::ID);
223
+		return $this->keyStorage->getSystemUserKey($this->recoveryKeyId.'.publicKey', Encryption::ID);
224 224
 	}
225 225
 
226 226
 	/**
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 	 * @return bool
238 238
 	 */
239 239
 	public function checkRecoveryPassword($password) {
240
-		$recoveryKey = $this->keyStorage->getSystemUserKey($this->recoveryKeyId . '.privateKey', Encryption::ID);
240
+		$recoveryKey = $this->keyStorage->getSystemUserKey($this->recoveryKeyId.'.privateKey', Encryption::ID);
241 241
 		$decryptedRecoveryKey = $this->crypt->decryptPrivateKey($recoveryKey, $password);
242 242
 
243 243
 		if ($decryptedRecoveryKey) {
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
 		$header = $this->crypt->generateHeader();
262 262
 
263 263
 		if ($encryptedKey) {
264
-			$this->setPrivateKey($uid, $header . $encryptedKey);
264
+			$this->setPrivateKey($uid, $header.$encryptedKey);
265 265
 			return true;
266 266
 		}
267 267
 		return false;
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 		$header = $this->crypt->generateHeader();
284 284
 
285 285
 		if ($encryptedKey) {
286
-			$this->setSystemPrivateKey($this->getRecoveryKeyId(), $header . $encryptedKey);
286
+			$this->setSystemPrivateKey($this->getRecoveryKeyId(), $header.$encryptedKey);
287 287
 			return true;
288 288
 		}
289 289
 		return false;
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
 	 * @return boolean
344 344
 	 */
345 345
 	public function setShareKey($path, $uid, $key) {
346
-		$keyId = $uid . '.' . $this->shareKeyId;
346
+		$keyId = $uid.'.'.$this->shareKeyId;
347 347
 		return $this->keyStorage->setFileKey($path, $keyId, $key, Encryption::ID);
348 348
 	}
349 349
 
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
 		$this->session->setStatus(Session::INIT_EXECUTED);
360 360
 
361 361
 		try {
362
-			if($this->util->isMasterKeyEnabled()) {
362
+			if ($this->util->isMasterKeyEnabled()) {
363 363
 				$uid = $this->getMasterKeyId();
364 364
 				$passPhrase = $this->getMasterKeyPassword();
365 365
 				$privateKey = $this->getSystemPrivateKey($uid);
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
 			return false;
374 374
 		} catch (\Exception $e) {
375 375
 			$this->log->logException($e, [
376
-				'message' => 'Could not decrypt the private key from user "' . $uid . '"" during login. Assume password change on the user back-end.',
376
+				'message' => 'Could not decrypt the private key from user "'.$uid.'"" during login. Assume password change on the user back-end.',
377 377
 				'level' => ILogger::WARN,
378 378
 				'app' => 'encryption',
379 379
 			]);
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
 			// use public share key for public links
435 435
 			$uid = $this->getPublicShareKeyId();
436 436
 			$shareKey = $this->getShareKey($path, $uid);
437
-			$privateKey = $this->keyStorage->getSystemUserKey($this->publicShareKeyId . '.privateKey', Encryption::ID);
437
+			$privateKey = $this->keyStorage->getSystemUserKey($this->publicShareKeyId.'.privateKey', Encryption::ID);
438 438
 			$privateKey = $this->crypt->decryptPrivateKey($privateKey);
439 439
 		} else {
440 440
 			$shareKey = $this->getShareKey($path, $uid);
@@ -459,7 +459,7 @@  discard block
 block discarded – undo
459 459
 	 */
460 460
 	public function getVersion($path, View $view) {
461 461
 		$fileInfo = $view->getFileInfo($path);
462
-		if($fileInfo === false) {
462
+		if ($fileInfo === false) {
463 463
 			return 0;
464 464
 		}
465 465
 		return $fileInfo->getEncryptedVersion();
@@ -473,9 +473,9 @@  discard block
 block discarded – undo
473 473
 	 * @param View $view
474 474
 	 */
475 475
 	public function setVersion($path, $version, View $view) {
476
-		$fileInfo= $view->getFileInfo($path);
476
+		$fileInfo = $view->getFileInfo($path);
477 477
 
478
-		if($fileInfo !== false) {
478
+		if ($fileInfo !== false) {
479 479
 			$cache = $fileInfo->getStorage()->getCache();
480 480
 			$cache->update($fileInfo->getId(), ['encrypted' => $version, 'encryptedVersion' => $version]);
481 481
 		}
@@ -504,7 +504,7 @@  discard block
 block discarded – undo
504 504
 	public function deleteShareKey($path, $keyId) {
505 505
 		return $this->keyStorage->deleteFileKey(
506 506
 			$path,
507
-			$keyId . '.' . $this->shareKeyId,
507
+			$keyId.'.'.$this->shareKeyId,
508 508
 			Encryption::ID);
509 509
 	}
510 510
 
@@ -515,7 +515,7 @@  discard block
 block discarded – undo
515 515
 	 * @return mixed
516 516
 	 */
517 517
 	public function getShareKey($path, $uid) {
518
-		$keyId = $uid . '.' . $this->shareKeyId;
518
+		$keyId = $uid.'.'.$this->shareKeyId;
519 519
 		return $this->keyStorage->getFileKey($path, $keyId, Encryption::ID);
520 520
 	}
521 521
 
@@ -577,7 +577,7 @@  discard block
 block discarded – undo
577 577
 	 * @return string
578 578
 	 */
579 579
 	public function getPublicShareKey() {
580
-		return $this->keyStorage->getSystemUserKey($this->publicShareKeyId . '.publicKey', Encryption::ID);
580
+		return $this->keyStorage->getSystemUserKey($this->publicShareKeyId.'.publicKey', Encryption::ID);
581 581
 	}
582 582
 
583 583
 	/**
@@ -647,7 +647,7 @@  discard block
 block discarded – undo
647 647
 	 * @return string returns openssl key
648 648
 	 */
649 649
 	public function getSystemPrivateKey($keyId) {
650
-		return $this->keyStorage->getSystemUserKey($keyId . '.' . $this->privateKeyId, Encryption::ID);
650
+		return $this->keyStorage->getSystemUserKey($keyId.'.'.$this->privateKeyId, Encryption::ID);
651 651
 	}
652 652
 
653 653
 	/**
@@ -657,7 +657,7 @@  discard block
 block discarded – undo
657 657
 	 */
658 658
 	public function setSystemPrivateKey($keyId, $key) {
659 659
 		return $this->keyStorage->setSystemUserKey(
660
-			$keyId . '.' . $this->privateKeyId,
660
+			$keyId.'.'.$this->privateKeyId,
661 661
 			$key,
662 662
 			Encryption::ID);
663 663
 	}
@@ -697,7 +697,7 @@  discard block
 block discarded – undo
697 697
 	 */
698 698
 	public function getMasterKeyPassword() {
699 699
 		$password = $this->config->getSystemValue('secret');
700
-		if (empty($password)){
700
+		if (empty($password)) {
701 701
 			throw new \Exception('Can not get secret from Nextcloud instance');
702 702
 		}
703 703
 
@@ -719,6 +719,6 @@  discard block
 block discarded – undo
719 719
 	 * @return string
720 720
 	 */
721 721
 	public function getPublicMasterKey() {
722
-		return $this->keyStorage->getSystemUserKey($this->masterKeyId . '.publicKey', Encryption::ID);
722
+		return $this->keyStorage->getSystemUserKey($this->masterKeyId.'.publicKey', Encryption::ID);
723 723
 	}
724 724
 }
Please login to merge, or discard this patch.
lib/autoloader.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -101,24 +101,24 @@  discard block
 block discarded – undo
101 101
 			 * Remove "apps/" from inclusion path for smooth migration to multi app dir
102 102
 			 */
103 103
 			if (strpos(\OC::$CLASSPATH[$class], 'apps/') === 0) {
104
-				\OCP\Util::writeLog('core', 'include path for class "' . $class . '" starts with "apps/"', ILogger::DEBUG);
104
+				\OCP\Util::writeLog('core', 'include path for class "'.$class.'" starts with "apps/"', ILogger::DEBUG);
105 105
 				$paths[] = str_replace('apps/', '', \OC::$CLASSPATH[$class]);
106 106
 			}
107 107
 		} elseif (strpos($class, 'OC_') === 0) {
108
-			$paths[] = \OC::$SERVERROOT . '/lib/private/legacy/' . strtolower(str_replace('_', '/', substr($class, 3)) . '.php');
108
+			$paths[] = \OC::$SERVERROOT.'/lib/private/legacy/'.strtolower(str_replace('_', '/', substr($class, 3)).'.php');
109 109
 		} elseif (strpos($class, 'OCA\\') === 0) {
110 110
 			list(, $app, $rest) = explode('\\', $class, 3);
111 111
 			$app = strtolower($app);
112 112
 			$appPath = \OC_App::getAppPath($app);
113 113
 			if ($appPath && stream_resolve_include_path($appPath)) {
114
-				$paths[] = $appPath . '/' . strtolower(str_replace('\\', '/', $rest) . '.php');
114
+				$paths[] = $appPath.'/'.strtolower(str_replace('\\', '/', $rest).'.php');
115 115
 				// If not found in the root of the app directory, insert '/lib' after app id and try again.
116
-				$paths[] = $appPath . '/lib/' . strtolower(str_replace('\\', '/', $rest) . '.php');
116
+				$paths[] = $appPath.'/lib/'.strtolower(str_replace('\\', '/', $rest).'.php');
117 117
 			}
118 118
 		} elseif ($class === 'Test\\TestCase') {
119 119
 			// This File is considered public API, so we make sure that the class
120 120
 			// can still be loaded, although the PSR-4 paths have not been loaded.
121
-			$paths[] = \OC::$SERVERROOT . '/tests/lib/TestCase.php';
121
+			$paths[] = \OC::$SERVERROOT.'/tests/lib/TestCase.php';
122 122
 		}
123 123
 		return $paths;
124 124
 	}
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 	 */
131 131
 	protected function isValidPath(string $fullPath): bool {
132 132
 		foreach ($this->validRoots as $root => $true) {
133
-			if (substr($fullPath, 0, strlen($root) + 1) === $root . '/') {
133
+			if (substr($fullPath, 0, strlen($root) + 1) === $root.'/') {
134 134
 				return true;
135 135
 			}
136 136
 		}
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 			$pathsToRequire = $this->memoryCache->get($class);
151 151
 		}
152 152
 
153
-		if(class_exists($class, false)) {
153
+		if (class_exists($class, false)) {
154 154
 			return false;
155 155
 		}
156 156
 
Please login to merge, or discard this patch.
lib/private/DateTimeZone.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 		try {
66 66
 			return new \DateTimeZone($timeZone);
67 67
 		} catch (\Exception $e) {
68
-			\OCP\Util::writeLog('datetimezone', 'Failed to created DateTimeZone "' . $timeZone . "'", ILogger::DEBUG);
68
+			\OCP\Util::writeLog('datetimezone', 'Failed to created DateTimeZone "'.$timeZone."'", ILogger::DEBUG);
69 69
 			return new \DateTimeZone($this->getDefaultTimeZone());
70 70
 		}
71 71
 	}
@@ -86,9 +86,9 @@  discard block
 block discarded – undo
86 86
 			// so a positive offset means negative timeZone
87 87
 			// and the other way around.
88 88
 			if ($offset > 0) {
89
-				$timeZone = 'Etc/GMT-' . $offset;
89
+				$timeZone = 'Etc/GMT-'.$offset;
90 90
 			} else {
91
-				$timeZone = 'Etc/GMT+' . abs($offset);
91
+				$timeZone = 'Etc/GMT+'.abs($offset);
92 92
 			}
93 93
 
94 94
 			return new \DateTimeZone($timeZone);
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 			}
111 111
 
112 112
 			// No timezone found, fallback to UTC
113
-			\OCP\Util::writeLog('datetimezone', 'Failed to find DateTimeZone for offset "' . $offset . "'", ILogger::DEBUG);
113
+			\OCP\Util::writeLog('datetimezone', 'Failed to find DateTimeZone for offset "'.$offset."'", ILogger::DEBUG);
114 114
 			return new \DateTimeZone($this->getDefaultTimeZone());
115 115
 		}
116 116
 	}
Please login to merge, or discard this patch.