Passed
Push — master ( a16703...c6645c )
by John
17:09 queued 13s
created
apps/dav/lib/CardDAV/ImageExportPlugin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 			return true;
73 73
 		}
74 74
 
75
-		$size = isset($queryParams['size']) ? (int)$queryParams['size'] : -1;
75
+		$size = isset($queryParams['size']) ? (int) $queryParams['size'] : -1;
76 76
 
77 77
 		$path = $request->getPath();
78 78
 		$node = $this->server->tree->getNodeForPath($path);
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 		try {
104 104
 			$file = $this->cache->get($addressbook->getResourceId(), $node->getName(), $size, $node);
105 105
 			$response->setHeader('Content-Type', $file->getMimeType());
106
-			$fileName = $node->getName() . '.' . PhotoCache::ALLOWED_CONTENT_TYPES[$file->getMimeType()];
106
+			$fileName = $node->getName().'.'.PhotoCache::ALLOWED_CONTENT_TYPES[$file->getMimeType()];
107 107
 			$response->setHeader('Content-Disposition', "attachment; filename=$fileName");
108 108
 			$response->setStatus(200);
109 109
 
Please login to merge, or discard this patch.
apps/settings/lib/Controller/ReasonsController.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
 	 * @NoSubAdminRequired
37 37
 	 */
38 38
 	public function getPdf() {
39
-		$data = file_get_contents(__DIR__ . '/../../data/Reasons to use Nextcloud.pdf');
39
+		$data = file_get_contents(__DIR__.'/../../data/Reasons to use Nextcloud.pdf');
40 40
 
41 41
 		$resp = new DataDisplayResponse($data);
42 42
 		$resp->addHeader('Content-Type', 'application/pdf');
Please login to merge, or discard this patch.
apps/user_status/lib/Connector/UserStatus.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
 			$this->status = IUserStatus::OFFLINE;
61 61
 		}
62 62
 		if ($status->getClearAt() !== null) {
63
-			$this->clearAt = DateTimeImmutable::createFromFormat('U', (string)$status->getClearAt());
63
+			$this->clearAt = DateTimeImmutable::createFromFormat('U', (string) $status->getClearAt());
64 64
 		}
65 65
 	}
66 66
 
Please login to merge, or discard this patch.
apps/comments/lib/Search/CommentsSearchProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 	public function search(IUser $user, ISearchQuery $query): SearchResult {
95 95
 		return SearchResult::complete(
96 96
 			$this->l10n->t('Comments'),
97
-			array_map(function (Result $result) {
97
+			array_map(function(Result $result) {
98 98
 				$path = $result->path;
99 99
 				$pathInfo = pathinfo($path);
100 100
 				$isUser = $this->userManager->userExists($result->authorId);
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 					$avatarUrl,
106 106
 					$result->name,
107 107
 					$path,
108
-					$this->urlGenerator->linkToRouteAbsolute('files.view.index',[
108
+					$this->urlGenerator->linkToRouteAbsolute('files.view.index', [
109 109
 						'dir' => $pathInfo['dirname'],
110 110
 						'scrollto' => $pathInfo['basename'],
111 111
 					]),
Please login to merge, or discard this patch.
apps/settings/templates/settings/personal/development.notice.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <div class="section development-notice">
2 2
 	<p>
3
-		<a href="<?php p($_['reasons-use-nextcloud-pdf-link']); ?>" id="open-reasons-use-nextcloud-pdf" class="link-button icon-file" target="_blank"><?php p($l->t('Reasons to use Nextcloud in your organization'));?></a>
3
+		<a href="<?php p($_['reasons-use-nextcloud-pdf-link']); ?>" id="open-reasons-use-nextcloud-pdf" class="link-button icon-file" target="_blank"><?php p($l->t('Reasons to use Nextcloud in your organization')); ?></a>
4 4
 	</p>
5 5
 	<p>
6 6
 		<?php print_unescaped(str_replace(
Please login to merge, or discard this patch.
core/Command/L10n/CreateJs.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@
 block discarded – undo
106 106
 		$jsTrans = [];
107 107
 		foreach ($translations as $id => $val) {
108 108
 			if (is_array($val)) {
109
-				$val = '[ ' . implode(',', $val) . ']';
109
+				$val = '[ '.implode(',', $val).']';
110 110
 			}
111 111
 			$jsTrans[] = "\"$id\" : \"$val\"";
112 112
 		}
Please login to merge, or discard this patch.
apps/files_trashbin/lib/Expiration.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 	/** @var bool */
52 52
 	private $canPurgeToSaveSpace;
53 53
 
54
-	public function __construct(IConfig $config,ITimeFactory $timeFactory) {
54
+	public function __construct(IConfig $config, ITimeFactory $timeFactory) {
55 55
 		$this->timeFactory = $timeFactory;
56 56
 		$this->setRetentionObligation($config->getSystemValue('trashbin_retention_obligation', 'auto'));
57 57
 	}
@@ -150,13 +150,13 @@  discard block
 block discarded – undo
150 150
 			$this->canPurgeToSaveSpace = true;
151 151
 		} elseif ($minValue !== 'auto' && $maxValue === 'auto') {
152 152
 			// Keep for X days but delete anytime if space needed
153
-			$this->minAge = (int)$minValue;
153
+			$this->minAge = (int) $minValue;
154 154
 			$this->maxAge = self::NO_OBLIGATION;
155 155
 			$this->canPurgeToSaveSpace = true;
156 156
 		} elseif ($minValue === 'auto' && $maxValue !== 'auto') {
157 157
 			// Delete anytime if space needed, Delete all older than max automatically
158 158
 			$this->minAge = self::NO_OBLIGATION;
159
-			$this->maxAge = (int)$maxValue;
159
+			$this->maxAge = (int) $maxValue;
160 160
 			$this->canPurgeToSaveSpace = true;
161 161
 		} elseif ($minValue !== 'auto' && $maxValue !== 'auto') {
162 162
 			// Delete all older than max OR older than min if space needed
@@ -166,8 +166,8 @@  discard block
 block discarded – undo
166 166
 				$maxValue = $minValue;
167 167
 			}
168 168
 
169
-			$this->minAge = (int)$minValue;
170
-			$this->maxAge = (int)$maxValue;
169
+			$this->minAge = (int) $minValue;
170
+			$this->maxAge = (int) $maxValue;
171 171
 			$this->canPurgeToSaveSpace = false;
172 172
 		}
173 173
 	}
Please login to merge, or discard this patch.
apps/systemtags/lib/Activity/Listener.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 		$activity->setApp('systemtags')
113 113
 			->setType('systemtags')
114 114
 			->setAuthor($actor)
115
-			->setObject('systemtag', (int)$tag->getId(), $tag->getName());
115
+			->setObject('systemtag', (int) $tag->getId(), $tag->getName());
116 116
 		if ($event->getEvent() === ManagerEvent::EVENT_CREATE) {
117 117
 			$activity->setSubject(Provider::CREATE_TAG, [
118 118
 				$actor,
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
 			->setObject($event->getObjectType(), (int) $event->getObjectId());
205 205
 
206 206
 		foreach ($users as $user => $path) {
207
-			$user = (string)$user; // numerical ids could be ints which are not accepted everywhere
207
+			$user = (string) $user; // numerical ids could be ints which are not accepted everywhere
208 208
 			$activity->setAffectedUser($user);
209 209
 
210 210
 			foreach ($tags as $tag) {
Please login to merge, or discard this patch.
apps/encryption/lib/KeyManager.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 		$this->recoveryKeyId = $this->config->getAppValue('encryption',
141 141
 			'recoveryKeyId');
142 142
 		if (empty($this->recoveryKeyId)) {
143
-			$this->recoveryKeyId = 'recoveryKey_' . substr(md5(time()), 0, 8);
143
+			$this->recoveryKeyId = 'recoveryKey_'.substr(md5(time()), 0, 8);
144 144
 			$this->config->setAppValue('encryption',
145 145
 				'recoveryKeyId',
146 146
 				$this->recoveryKeyId);
@@ -149,14 +149,14 @@  discard block
 block discarded – undo
149 149
 		$this->publicShareKeyId = $this->config->getAppValue('encryption',
150 150
 			'publicShareKeyId');
151 151
 		if (empty($this->publicShareKeyId)) {
152
-			$this->publicShareKeyId = 'pubShare_' . substr(md5(time()), 0, 8);
152
+			$this->publicShareKeyId = 'pubShare_'.substr(md5(time()), 0, 8);
153 153
 			$this->config->setAppValue('encryption', 'publicShareKeyId', $this->publicShareKeyId);
154 154
 		}
155 155
 
156 156
 		$this->masterKeyId = $this->config->getAppValue('encryption',
157 157
 			'masterKeyId');
158 158
 		if (empty($this->masterKeyId)) {
159
-			$this->masterKeyId = 'master_' . substr(md5(time()), 0, 8);
159
+			$this->masterKeyId = 'master_'.substr(md5(time()), 0, 8);
160 160
 			$this->config->setAppValue('encryption', 'masterKeyId', $this->masterKeyId);
161 161
 		}
162 162
 
@@ -176,13 +176,13 @@  discard block
 block discarded – undo
176 176
 
177 177
 				// Save public key
178 178
 				$this->keyStorage->setSystemUserKey(
179
-					$this->publicShareKeyId . '.' . $this->publicKeyId, $keyPair['publicKey'],
179
+					$this->publicShareKeyId.'.'.$this->publicKeyId, $keyPair['publicKey'],
180 180
 					Encryption::ID);
181 181
 
182 182
 				// Encrypt private key empty passphrase
183 183
 				$encryptedKey = $this->crypt->encryptPrivateKey($keyPair['privateKey'], '');
184 184
 				$header = $this->crypt->generateHeader();
185
-				$this->setSystemPrivateKey($this->publicShareKeyId, $header . $encryptedKey);
185
+				$this->setSystemPrivateKey($this->publicShareKeyId, $header.$encryptedKey);
186 186
 			} catch (\Throwable $e) {
187 187
 				$this->lockingProvider->releaseLock('encryption-generateSharedKey', ILockingProvider::LOCK_EXCLUSIVE);
188 188
 				throw $e;
@@ -212,13 +212,13 @@  discard block
 block discarded – undo
212 212
 
213 213
 				// Save public key
214 214
 				$this->keyStorage->setSystemUserKey(
215
-					$this->masterKeyId . '.' . $this->publicKeyId, $keyPair['publicKey'],
215
+					$this->masterKeyId.'.'.$this->publicKeyId, $keyPair['publicKey'],
216 216
 					Encryption::ID);
217 217
 
218 218
 				// Encrypt private key with system password
219 219
 				$encryptedKey = $this->crypt->encryptPrivateKey($keyPair['privateKey'], $this->getMasterKeyPassword(), $this->masterKeyId);
220 220
 				$header = $this->crypt->generateHeader();
221
-				$this->setSystemPrivateKey($this->masterKeyId, $header . $encryptedKey);
221
+				$this->setSystemPrivateKey($this->masterKeyId, $header.$encryptedKey);
222 222
 			} catch (\Throwable $e) {
223 223
 				$this->lockingProvider->releaseLock('encryption-generateMasterKey', ILockingProvider::LOCK_EXCLUSIVE);
224 224
 				throw $e;
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
 	 * @return string
257 257
 	 */
258 258
 	public function getRecoveryKey() {
259
-		return $this->keyStorage->getSystemUserKey($this->recoveryKeyId . '.' . $this->publicKeyId, Encryption::ID);
259
+		return $this->keyStorage->getSystemUserKey($this->recoveryKeyId.'.'.$this->publicKeyId, Encryption::ID);
260 260
 	}
261 261
 
262 262
 	/**
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
 	 * @return bool
274 274
 	 */
275 275
 	public function checkRecoveryPassword($password) {
276
-		$recoveryKey = $this->keyStorage->getSystemUserKey($this->recoveryKeyId . '.' . $this->privateKeyId, Encryption::ID);
276
+		$recoveryKey = $this->keyStorage->getSystemUserKey($this->recoveryKeyId.'.'.$this->privateKeyId, Encryption::ID);
277 277
 		$decryptedRecoveryKey = $this->crypt->decryptPrivateKey($recoveryKey, $password);
278 278
 
279 279
 		if ($decryptedRecoveryKey) {
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
 		$header = $this->crypt->generateHeader();
298 298
 
299 299
 		if ($encryptedKey) {
300
-			$this->setPrivateKey($uid, $header . $encryptedKey);
300
+			$this->setPrivateKey($uid, $header.$encryptedKey);
301 301
 			return true;
302 302
 		}
303 303
 		return false;
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
 	public function setRecoveryKey($password, $keyPair) {
312 312
 		// Save Public Key
313 313
 		$this->keyStorage->setSystemUserKey($this->getRecoveryKeyId().
314
-			'.' . $this->publicKeyId,
314
+			'.'.$this->publicKeyId,
315 315
 			$keyPair['publicKey'],
316 316
 			Encryption::ID);
317 317
 
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
 		$header = $this->crypt->generateHeader();
320 320
 
321 321
 		if ($encryptedKey) {
322
-			$this->setSystemPrivateKey($this->getRecoveryKeyId(), $header . $encryptedKey);
322
+			$this->setSystemPrivateKey($this->getRecoveryKeyId(), $header.$encryptedKey);
323 323
 			return true;
324 324
 		}
325 325
 		return false;
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
 	 * @return boolean
380 380
 	 */
381 381
 	public function setShareKey($path, $uid, $key) {
382
-		$keyId = $uid . '.' . $this->shareKeyId;
382
+		$keyId = $uid.'.'.$this->shareKeyId;
383 383
 		return $this->keyStorage->setFileKey($path, $keyId, $key, Encryption::ID);
384 384
 	}
385 385
 
@@ -408,7 +408,7 @@  discard block
 block discarded – undo
408 408
 			return false;
409 409
 		} catch (\Exception $e) {
410 410
 			$this->log->logException($e, [
411
-				'message' => 'Could not decrypt the private key from user "' . $uid . '"" during login. Assume password change on the user back-end.',
411
+				'message' => 'Could not decrypt the private key from user "'.$uid.'"" during login. Assume password change on the user back-end.',
412 412
 				'level' => ILogger::WARN,
413 413
 				'app' => 'encryption',
414 414
 			]);
@@ -469,7 +469,7 @@  discard block
 block discarded – undo
469 469
 			// use public share key for public links
470 470
 			$uid = $this->getPublicShareKeyId();
471 471
 			$shareKey = $this->getShareKey($path, $uid);
472
-			$privateKey = $this->keyStorage->getSystemUserKey($this->publicShareKeyId . '.' . $this->privateKeyId, Encryption::ID);
472
+			$privateKey = $this->keyStorage->getSystemUserKey($this->publicShareKeyId.'.'.$this->privateKeyId, Encryption::ID);
473 473
 			$privateKey = $this->crypt->decryptPrivateKey($privateKey);
474 474
 		} else {
475 475
 			$shareKey = $this->getShareKey($path, $uid);
@@ -539,7 +539,7 @@  discard block
 block discarded – undo
539 539
 	public function deleteShareKey($path, $keyId) {
540 540
 		return $this->keyStorage->deleteFileKey(
541 541
 			$path,
542
-			$keyId . '.' . $this->shareKeyId,
542
+			$keyId.'.'.$this->shareKeyId,
543 543
 			Encryption::ID);
544 544
 	}
545 545
 
@@ -550,7 +550,7 @@  discard block
 block discarded – undo
550 550
 	 * @return mixed
551 551
 	 */
552 552
 	public function getShareKey($path, $uid) {
553
-		$keyId = $uid . '.' . $this->shareKeyId;
553
+		$keyId = $uid.'.'.$this->shareKeyId;
554 554
 		return $this->keyStorage->getFileKey($path, $keyId, Encryption::ID);
555 555
 	}
556 556
 
@@ -612,7 +612,7 @@  discard block
 block discarded – undo
612 612
 	 * @return string
613 613
 	 */
614 614
 	public function getPublicShareKey() {
615
-		return $this->keyStorage->getSystemUserKey($this->publicShareKeyId . '.' . $this->publicKeyId, Encryption::ID);
615
+		return $this->keyStorage->getSystemUserKey($this->publicShareKeyId.'.'.$this->publicKeyId, Encryption::ID);
616 616
 	}
617 617
 
618 618
 	/**
@@ -681,7 +681,7 @@  discard block
 block discarded – undo
681 681
 	 * @return string returns openssl key
682 682
 	 */
683 683
 	public function getSystemPrivateKey($keyId) {
684
-		return $this->keyStorage->getSystemUserKey($keyId . '.' . $this->privateKeyId, Encryption::ID);
684
+		return $this->keyStorage->getSystemUserKey($keyId.'.'.$this->privateKeyId, Encryption::ID);
685 685
 	}
686 686
 
687 687
 	/**
@@ -691,7 +691,7 @@  discard block
 block discarded – undo
691 691
 	 */
692 692
 	public function setSystemPrivateKey($keyId, $key) {
693 693
 		return $this->keyStorage->setSystemUserKey(
694
-			$keyId . '.' . $this->privateKeyId,
694
+			$keyId.'.'.$this->privateKeyId,
695 695
 			$key,
696 696
 			Encryption::ID);
697 697
 	}
@@ -752,7 +752,7 @@  discard block
 block discarded – undo
752 752
 	 * @return string
753 753
 	 */
754 754
 	public function getPublicMasterKey() {
755
-		return $this->keyStorage->getSystemUserKey($this->masterKeyId . '.' . $this->publicKeyId, Encryption::ID);
755
+		return $this->keyStorage->getSystemUserKey($this->masterKeyId.'.'.$this->publicKeyId, Encryption::ID);
756 756
 	}
757 757
 
758 758
 	/**
@@ -761,6 +761,6 @@  discard block
 block discarded – undo
761 761
 	 * @return string
762 762
 	 */
763 763
 	public function getPrivateMasterKey() {
764
-		return $this->keyStorage->getSystemUserKey($this->masterKeyId . '.' . $this->privateKeyId, Encryption::ID);
764
+		return $this->keyStorage->getSystemUserKey($this->masterKeyId.'.'.$this->privateKeyId, Encryption::ID);
765 765
 	}
766 766
 }
Please login to merge, or discard this patch.