Passed
Push — master ( 746e3f...4ff492 )
by Joas
13:33
created
apps/files_external/lib/Command/Notify.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 			return 1;
129 129
 		}
130 130
 		if (!$storage instanceof INotifyStorage) {
131
-			$output->writeln('<error>Mount of type "' . $mount->getBackend()->getText() . '" does not support active update notifications</error>');
131
+			$output->writeln('<error>Mount of type "'.$mount->getBackend()->getText().'" does not support active update notifications</error>');
132 132
 			return 1;
133 133
 		}
134 134
 
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 		$path = trim($input->getOption('path'), '/');
138 138
 		$notifyHandler = $storage->notify($path);
139 139
 		$this->selfTest($storage, $notifyHandler, $verbose, $output);
140
-		$notifyHandler->listen(function (IChange $change) use ($mount, $verbose, $output) {
140
+		$notifyHandler->listen(function(IChange $change) use ($mount, $verbose, $output) {
141 141
 			if ($verbose) {
142 142
 				$this->logUpdate($change, $output);
143 143
 			}
@@ -168,14 +168,14 @@  discard block
 block discarded – undo
168 168
 			$storageIds = $this->getStorageIds($mountId);
169 169
 		}
170 170
 		if (count($storageIds) === 0) {
171
-			throw new StorageNotAvailableException('No storages found by mount ID ' . $mountId);
171
+			throw new StorageNotAvailableException('No storages found by mount ID '.$mountId);
172 172
 		}
173 173
 		$storageIds = array_map('intval', $storageIds);
174 174
 
175 175
 		$result = $this->updateParent($storageIds, $parent);
176 176
 		if ($result === 0) {
177 177
 			//TODO: Find existing parent further up the tree in the database and register that folder instead.
178
-			$this->logger->info('Failed updating parent for "' . $path . '" while trying to register change. It may not exist in the filecache.');
178
+			$this->logger->info('Failed updating parent for "'.$path.'" while trying to register change. It may not exist in the filecache.');
179 179
 		}
180 180
 	}
181 181
 
@@ -197,9 +197,9 @@  discard block
 block discarded – undo
197 197
 				return;
198 198
 		}
199 199
 
200
-		$text .= ' ' . $change->getPath();
200
+		$text .= ' '.$change->getPath();
201 201
 		if ($change instanceof IRenameChange) {
202
-			$text .= ' to ' . $change->getTargetPath();
202
+			$text .= ' to '.$change->getTargetPath();
203 203
 		}
204 204
 
205 205
 		$output->writeln($text);
Please login to merge, or discard this patch.
lib/private/Collaboration/Resources/Manager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 			->setFirstResult($start);
145 145
 
146 146
 		if ($filter !== '') {
147
-			$query->where($query->expr()->iLike('c.name', $query->createNamedParameter('%' . $this->connection->escapeLikeParameter($filter) . '%')));
147
+			$query->where($query->expr()->iLike('c.name', $query->createNamedParameter('%'.$this->connection->escapeLikeParameter($filter).'%')));
148 148
 		}
149 149
 
150 150
 		$result = $query->execute();
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 		while ($row = $result->fetch()) {
155 155
 			$foundResults++;
156 156
 			$access = $row['access'] === null ? null : (bool) $row['access'];
157
-			$collection = new Collection($this, $this->connection, (int)$row['id'], (string)$row['name'], $user, $access);
157
+			$collection = new Collection($this, $this->connection, (int) $row['id'], (string) $row['name'], $user, $access);
158 158
 			if ($collection->canAccess($user)) {
159 159
 				$collections[] = $collection;
160 160
 			}
Please login to merge, or discard this patch.
lib/public/AppFramework/Http/OCSResponse.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,8 +57,8 @@
 block discarded – undo
57 57
 	 * @deprecated 9.2.0 To implement an OCS endpoint extend the OCSController
58 58
 	 */
59 59
 	public function __construct($format, $statuscode, $message,
60
-								$data=[], $itemscount='',
61
-								$itemsperpage='') {
60
+								$data = [], $itemscount = '',
61
+								$itemsperpage = '') {
62 62
 		parent::__construct();
63 63
 
64 64
 		$this->format = $format;
Please login to merge, or discard this patch.
lib/public/AppFramework/Http/FileDisplayResponse.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -43,14 +43,14 @@  discard block
 block discarded – undo
43 43
 	 * @param array $headers
44 44
 	 * @since 11.0.0
45 45
 	 */
46
-	public function __construct($file, $statusCode=Http::STATUS_OK,
47
-								$headers=[]) {
46
+	public function __construct($file, $statusCode = Http::STATUS_OK,
47
+								$headers = []) {
48 48
 		parent::__construct();
49 49
 
50 50
 		$this->file = $file;
51 51
 		$this->setStatus($statusCode);
52 52
 		$this->setHeaders(array_merge($this->getHeaders(), $headers));
53
-		$this->addHeader('Content-Disposition', 'inline; filename="' . rawurldecode($file->getName()) . '"');
53
+		$this->addHeader('Content-Disposition', 'inline; filename="'.rawurldecode($file->getName()).'"');
54 54
 
55 55
 		$this->setETag($file->getEtag());
56 56
 		$lastModified = new \DateTime();
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 	 */
65 65
 	public function callback(IOutput $output) {
66 66
 		if ($output->getHttpResponseCode() !== Http::STATUS_NOT_MODIFIED) {
67
-			$output->setHeader('Content-Length: ' . $this->file->getSize());
67
+			$output->setHeader('Content-Length: '.$this->file->getSize());
68 68
 			$output->setOutput($this->file->getContent());
69 69
 		}
70 70
 	}
Please login to merge, or discard this patch.
lib/private/Authentication/Login/CreateSessionTokenCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
 
46 46
 	public function process(LoginData $loginData): LoginResult {
47 47
 		$tokenType = IToken::REMEMBER;
48
-		if ((int)$this->config->getSystemValue('remember_login_cookie_lifetime', 60 * 60 * 24 * 15) === 0) {
48
+		if ((int) $this->config->getSystemValue('remember_login_cookie_lifetime', 60 * 60 * 24 * 15) === 0) {
49 49
 			$loginData->setRememberLogin(false);
50 50
 			$tokenType = IToken::DO_NOT_REMEMBER;
51 51
 		}
Please login to merge, or discard this patch.
lib/private/Log/ExceptionSerializer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 
100 100
 	private function filterTrace(array $trace) {
101 101
 		$sensitiveValues = [];
102
-		$trace = array_map(function (array $traceLine) use (&$sensitiveValues) {
102
+		$trace = array_map(function(array $traceLine) use (&$sensitiveValues) {
103 103
 			$className = $traceLine['class'] ?? '';
104 104
 			if ($className && isset(self::methodsWithSensitiveParametersByClass[$className])
105 105
 				&& in_array($traceLine['function'], self::methodsWithSensitiveParametersByClass[$className], true)) {
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 			}
113 113
 			return $traceLine;
114 114
 		}, $trace);
115
-		return array_map(function (array $traceLine) use ($sensitiveValues) {
115
+		return array_map(function(array $traceLine) use ($sensitiveValues) {
116 116
 			if (isset($traceLine['args'])) {
117 117
 				$traceLine['args'] = $this->removeValuesFromArgs($traceLine['args'], $sensitiveValues);
118 118
 			}
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 
134 134
 	private function encodeTrace($trace) {
135 135
 		$filteredTrace = $this->filterTrace($trace);
136
-		return array_map(function (array $line) {
136
+		return array_map(function(array $line) {
137 137
 			if (isset($line['args'])) {
138 138
 				$line['args'] = array_map([$this, 'encodeArg'], $line['args']);
139 139
 			}
Please login to merge, or discard this patch.
lib/private/Files/ObjectStore/ObjectStoreStorage.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -57,9 +57,9 @@  discard block
 block discarded – undo
57 57
 			throw new \Exception('missing IObjectStore instance');
58 58
 		}
59 59
 		if (isset($params['storageid'])) {
60
-			$this->id = 'object::store:' . $params['storageid'];
60
+			$this->id = 'object::store:'.$params['storageid'];
61 61
 		} else {
62
-			$this->id = 'object::store:' . $this->objectStore->getStorageId();
62
+			$this->id = 'object::store:'.$this->objectStore->getStorageId();
63 63
 		}
64 64
 		if (isset($params['objectPrefix'])) {
65 65
 			$this->objectPrefix = $params['objectPrefix'];
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 				if ($ex->getCode() !== 404) {
194 194
 					$this->logger->logException($ex, [
195 195
 						'app' => 'objectstore',
196
-						'message' => 'Could not delete object ' . $this->getURN($stat['fileid']) . ' for ' . $path,
196
+						'message' => 'Could not delete object '.$this->getURN($stat['fileid']).' for '.$path,
197 197
 					]);
198 198
 					return false;
199 199
 				}
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 	 */
226 226
 	public function getURN($fileId) {
227 227
 		if (is_numeric($fileId)) {
228
-			return $this->objectPrefix . $fileId;
228
+			return $this->objectPrefix.$fileId;
229 229
 		}
230 230
 		return null;
231 231
 	}
@@ -279,13 +279,13 @@  discard block
 block discarded – undo
279 279
 					} catch (NotFoundException $e) {
280 280
 						$this->logger->logException($e, [
281 281
 							'app' => 'objectstore',
282
-							'message' => 'Could not get object ' . $this->getURN($stat['fileid']) . ' for file ' . $path,
282
+							'message' => 'Could not get object '.$this->getURN($stat['fileid']).' for file '.$path,
283 283
 						]);
284 284
 						throw $e;
285 285
 					} catch (\Exception $ex) {
286 286
 						$this->logger->logException($ex, [
287 287
 							'app' => 'objectstore',
288
-							'message' => 'Could not get object ' . $this->getURN($stat['fileid']) . ' for file ' . $path,
288
+							'message' => 'Could not get object '.$this->getURN($stat['fileid']).' for file '.$path,
289 289
 						]);
290 290
 						return false;
291 291
 					}
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
 			case 'wb+':
299 299
 				$tmpFile = \OC::$server->getTempManager()->getTemporaryFile($ext);
300 300
 				$handle = fopen($tmpFile, $mode);
301
-				return CallbackWrapper::wrap($handle, null, null, function () use ($path, $tmpFile) {
301
+				return CallbackWrapper::wrap($handle, null, null, function() use ($path, $tmpFile) {
302 302
 					$this->writeBack($tmpFile, $path);
303 303
 				});
304 304
 			case 'a':
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
 					file_put_contents($tmpFile, $source);
316 316
 				}
317 317
 				$handle = fopen($tmpFile, $mode);
318
-				return CallbackWrapper::wrap($handle, null, null, function () use ($path, $tmpFile) {
318
+				return CallbackWrapper::wrap($handle, null, null, function() use ($path, $tmpFile) {
319 319
 					$this->writeBack($tmpFile, $path);
320 320
 				});
321 321
 		}
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
 
325 325
 	public function file_exists($path) {
326 326
 		$path = $this->normalizePath($path);
327
-		return (bool)$this->stat($path);
327
+		return (bool) $this->stat($path);
328 328
 	}
329 329
 
330 330
 	public function rename($source, $target) {
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
 			} catch (\Exception $ex) {
382 382
 				$this->logger->logException($ex, [
383 383
 					'app' => 'objectstore',
384
-					'message' => 'Could not create object for ' . $path,
384
+					'message' => 'Could not create object for '.$path,
385 385
 				]);
386 386
 				throw $ex;
387 387
 			}
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
 		}
427 427
 		// update stat with new data
428 428
 		$mTime = time();
429
-		$stat['size'] = (int)$size;
429
+		$stat['size'] = (int) $size;
430 430
 		$stat['mtime'] = $mTime;
431 431
 		$stat['storage_mtime'] = $mTime;
432 432
 
@@ -437,13 +437,13 @@  discard block
 block discarded – undo
437 437
 		$stat['etag'] = $this->getETag($path);
438 438
 
439 439
 		$exists = $this->getCache()->inCache($path);
440
-		$uploadPath = $exists ? $path : $path . '.part';
440
+		$uploadPath = $exists ? $path : $path.'.part';
441 441
 		$fileId = $this->getCache()->put($uploadPath, $stat);
442 442
 		$urn = $this->getURN($fileId);
443 443
 		try {
444 444
 			//upload to object storage
445 445
 			if ($size === null) {
446
-				$countStream = CountWrapper::wrap($stream, function ($writtenSize) use ($fileId, &$size) {
446
+				$countStream = CountWrapper::wrap($stream, function($writtenSize) use ($fileId, &$size) {
447 447
 					$this->getCache()->update($fileId, [
448 448
 						'size' => $writtenSize
449 449
 					]);
@@ -460,7 +460,7 @@  discard block
 block discarded – undo
460 460
 			$this->getCache()->remove($uploadPath);
461 461
 			$this->logger->logException($ex, [
462 462
 				'app' => 'objectstore',
463
-				'message' => 'Could not create object ' . $urn . ' for ' . $path,
463
+				'message' => 'Could not create object '.$urn.' for '.$path,
464 464
 			]);
465 465
 			throw $ex; // make this bubble up
466 466
 		}
Please login to merge, or discard this patch.
apps/federatedfilesharing/templates/settings-personal.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 <div id="fileSharingSettings" class="section">
9 9
 	<h2 data-anchor-name="federated-cloud"><?php p($l->t('Federated Cloud')); ?></h2>
10 10
 	<a target="_blank" rel="noreferrer noopener" class="icon-info svg"
11
-	title="<?php p($l->t('Open documentation'));?>"
11
+	title="<?php p($l->t('Open documentation')); ?>"
12 12
 	href="<?php p(link_to_docs('user-sharing-federated')); ?>"></a>
13 13
 	<p class="settings-hint"><?php p($l->t('You can share with anyone who uses a Nextcloud server or other Open Cloud Mesh (OCM) compatible servers and services! Just put their Federated Cloud ID in the share dialog. It looks like [email protected]')); ?></p>
14 14
 
Please login to merge, or discard this patch.
apps/federatedfilesharing/lib/Settings/Personal.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
 	 */
61 61
 	public function getForm() {
62 62
 		$cloudID = $this->userSession->getUser()->getCloudId();
63
-		$url = 'https://nextcloud.com/sharing#' . $cloudID;
63
+		$url = 'https://nextcloud.com/sharing#'.$cloudID;
64 64
 
65 65
 		$parameters = [
66 66
 			'message_with_URL' => $this->l->t('Share with me through my #Nextcloud Federated Cloud ID, see %s', [$url]),
Please login to merge, or discard this patch.