Completed
Pull Request — master (#2007)
by
unknown
27s
created
lib/Model/FileCacheWrapper.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -456,7 +456,7 @@  discard block
 block discarded – undo
456 456
 		}
457 457
 
458 458
 		$path = $this->getPath();
459
-		[$storageType,] = explode('::', $this->getStorage(), 2);
459
+		[$storageType, ] = explode('::', $this->getStorage(), 2);
460 460
 
461 461
 		if ($path === '') {
462 462
 			// we only accept empty path on external storage
@@ -508,29 +508,29 @@  discard block
 block discarded – undo
508 508
 	 * @throws FileCacheNotFoundException
509 509
 	 */
510 510
 	public function importFromDatabase(array $data, string $prefix = ''): IQueryRow {
511
-		if ($this->getInt($prefix . 'fileid', $data) === 0) {
511
+		if ($this->getInt($prefix.'fileid', $data) === 0) {
512 512
 			throw new FileCacheNotFoundException();
513 513
 		}
514 514
 
515
-		$this->setId($this->getInt($prefix . 'fileid', $data));
516
-		$this->setPath($this->get($prefix . 'path', $data));
517
-		$this->setPermissions($this->getInt($prefix . 'permissions', $data));
518
-		$this->setStorageId($this->getInt($prefix . 'storage', $data));
519
-		$this->setPathHash($this->get($prefix . 'path_hash', $data));
520
-		$this->setParent($this->getInt($prefix . 'parent', $data));
521
-		$this->setName($this->get($prefix . 'name', $data));
522
-		$this->setMimeType($this->getInt($prefix . 'mimetype', $data));
523
-		$this->setMimePart($this->getInt($prefix . 'mimepart', $data));
524
-		$this->setSize($this->getInt($prefix . 'size', $data));
525
-		$this->setMTime($this->getInt($prefix . 'mtime', $data));
526
-		$this->setStorageMTime($this->getInt($prefix . 'storage_mtime', $data));
527
-		$this->setEncrypted($this->getBool($prefix . 'encrypted', $data));
528
-		$this->setUnencryptedSize($this->getInt($prefix . 'unencrypted_size', $data));
529
-		$this->setEtag($this->get($prefix . 'etag', $data));
530
-		$this->setChecksum($this->get($prefix . 'checksum', $data));
515
+		$this->setId($this->getInt($prefix.'fileid', $data));
516
+		$this->setPath($this->get($prefix.'path', $data));
517
+		$this->setPermissions($this->getInt($prefix.'permissions', $data));
518
+		$this->setStorageId($this->getInt($prefix.'storage', $data));
519
+		$this->setPathHash($this->get($prefix.'path_hash', $data));
520
+		$this->setParent($this->getInt($prefix.'parent', $data));
521
+		$this->setName($this->get($prefix.'name', $data));
522
+		$this->setMimeType($this->getInt($prefix.'mimetype', $data));
523
+		$this->setMimePart($this->getInt($prefix.'mimepart', $data));
524
+		$this->setSize($this->getInt($prefix.'size', $data));
525
+		$this->setMTime($this->getInt($prefix.'mtime', $data));
526
+		$this->setStorageMTime($this->getInt($prefix.'storage_mtime', $data));
527
+		$this->setEncrypted($this->getBool($prefix.'encrypted', $data));
528
+		$this->setUnencryptedSize($this->getInt($prefix.'unencrypted_size', $data));
529
+		$this->setEtag($this->get($prefix.'etag', $data));
530
+		$this->setChecksum($this->get($prefix.'checksum', $data));
531 531
 
532 532
 		// small hack as there is no reason to call a recursive method for a single entry from the table
533
-		$this->setStorage($this->get($prefix . CoreQueryBuilder::STORAGES . '_id', $data));
533
+		$this->setStorage($this->get($prefix.CoreQueryBuilder::STORAGES.'_id', $data));
534 534
 
535 535
 		return $this;
536 536
 	}
Please login to merge, or discard this patch.
lib/Service/ActivityService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
 		$event->setSubject('circle_create', ['circle' => json_encode($circle)]);
76 76
 
77 77
 		$this->userManager->callForSeenUsers(
78
-			function ($user) use ($event) {
78
+			function($user) use ($event) {
79 79
 				/** @var IUser $user */
80 80
 				$this->publishEvent($event, [$user]);
81 81
 			}
Please login to merge, or discard this patch.
lib/Db/CircleRequest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -184,8 +184,8 @@
 block discarded – undo
184 184
 		$qb->filterCircles(CoreQueryBuilder::CIRCLE, $probe);
185 185
 		if (!is_null($initiator)) {
186 186
 			$qb->limitToInitiator(CoreQueryBuilder::CIRCLE, $initiator);
187
-			$qb->orderBy($qb->generateAlias(CoreQueryBuilder::CIRCLE, CoreQueryBuilder::INITIATOR) . '.level', 'desc');
188
-			$qb->addOrderBy(CoreQueryBuilder::CIRCLE . '.display_name', 'asc');
187
+			$qb->orderBy($qb->generateAlias(CoreQueryBuilder::CIRCLE, CoreQueryBuilder::INITIATOR).'.level', 'desc');
188
+			$qb->addOrderBy(CoreQueryBuilder::CIRCLE.'.display_name', 'asc');
189 189
 		}
190 190
 		if ($probe->hasFilterMember()) {
191 191
 			$qb->limitToDirectMembership(CoreQueryBuilder::CIRCLE, $probe->getFilterMember());
Please login to merge, or discard this patch.
lib/Activity/Provider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
 			$this->parseAsNonMember($event, $circle);
69 69
 			$this->parseAsMember($event, $circle, $params);
70 70
 			$this->parseAsModerator($event, $circle, $params);
71
-		} catch (FakeException|InvalidItemException $e) {
71
+		} catch (FakeException | InvalidItemException $e) {
72 72
 			/** clean exit */
73 73
 		}
74 74
 
Please login to merge, or discard this patch.
lib/Handlers/WebfingerHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
 				'version' => $this->configService->getAppValue('installed_version'),
88 88
 				'api' => Application::APP_API
89 89
 			];
90
-		} catch (UnknownInterfaceException|SignatoryException $e) {
90
+		} catch (UnknownInterfaceException | SignatoryException $e) {
91 91
 			return $response;
92 92
 		}
93 93
 
Please login to merge, or discard this patch.
lib/Dashboard/TeamDashboardWidget.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
 				->setItemsLimit($limit)
77 77
 				->setItemsOffset($since ? (int)$since : 0);
78 78
 
79
-			$circles = array_map(function (Circle $circle) {
79
+			$circles = array_map(function(Circle $circle) {
80 80
 				return new WidgetItem(
81 81
 					$circle->getDisplayName(),
82 82
 					'',
Please login to merge, or discard this patch.
lib/Activity/ProviderParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@
 block discarded – undo
125 125
 				continue;
126 126
 			}
127 127
 
128
-			$replace['{' . $k . '}'] = $data[$k]['_parsed'];
128
+			$replace['{'.$k.'}'] = $data[$k]['_parsed'];
129 129
 		}
130 130
 
131 131
 		$event->setParsedSubject(strtr($line, $replace));
Please login to merge, or discard this patch.
lib/ShareByCircleProvider.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
 
443 443
 		return array_filter(
444 444
 			array_map(
445
-				function (ShareWrapper $wrapper) {
445
+				function(ShareWrapper $wrapper) {
446 446
 					return $wrapper->getShare($this->rootFolder, $this->userManager, $this->urlGenerator);
447 447
 				}, $wrappedShares
448 448
 			)
@@ -494,7 +494,7 @@  discard block
 block discarded – undo
494 494
 
495 495
 		return array_filter(
496 496
 			array_map(
497
-				function (ShareWrapper $wrapper) {
497
+				function(ShareWrapper $wrapper) {
498 498
 					return $wrapper->getShare($this->rootFolder, $this->userManager, $this->urlGenerator);
499 499
 				}, $wrappedShares
500 500
 			)
@@ -543,7 +543,7 @@  discard block
 block discarded – undo
543 543
 
544 544
 		return array_filter(
545 545
 			array_map(
546
-				function (ShareWrapper $wrapper) {
546
+				function(ShareWrapper $wrapper) {
547 547
 					return $wrapper->getShare(
548 548
 						$this->rootFolder, $this->userManager, $this->urlGenerator, true
549 549
 					);
@@ -574,7 +574,7 @@  discard block
 block discarded – undo
574 574
 
575 575
 		$share = $wrappedShare->getShare($this->rootFolder, $this->userManager, $this->urlGenerator);
576 576
 		if ($share->getPassword() !== '') {
577
-			$this->logger->notice('share is protected by a password, hash: ' . $share->getPassword());
577
+			$this->logger->notice('share is protected by a password, hash: '.$share->getPassword());
578 578
 		}
579 579
 
580 580
 		return $share;
@@ -684,7 +684,7 @@  discard block
 block discarded – undo
684 684
 							];
685 685
 						} else {
686 686
 							// we only store temp value, as token is unknown at this point
687
-							$remote[$member->getUserid() . '@' . $member->getInstance()] = [
687
+							$remote[$member->getUserid().'@'.$member->getInstance()] = [
688 688
 								'node_id' => $share->getFileSource(),
689 689
 								'shareId' => $share->getId(),
690 690
 								'memberId' => $member->getId(),
Please login to merge, or discard this patch.
lib/Tools/ActivityPub/NCSignature.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -196,8 +196,8 @@  discard block
 block discarded – undo
196 196
 			throw new SignatureException('missing elements in \'headers\'');
197 197
 		}
198 198
 
199
-		$target = strtolower($request->getMethod()) . ' ' . $request->getRequestUri();
200
-		$estimated = ['(request-target): ' . $target];
199
+		$target = strtolower($request->getMethod()).' '.$request->getRequestUri();
200
+		$estimated = ['(request-target): '.$target];
201 201
 
202 202
 		foreach ($headers as $key) {
203 203
 			$value = $request->getHeader($key);
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 				throw new SignatureException('empty elements in \'headers\'');
209 209
 			}
210 210
 
211
-			$estimated[] = $key . ': ' . $value;
211
+			$estimated[] = $key.': '.$value;
212 212
 		}
213 213
 		$signedRequest->setClearSignature(implode("\n", $estimated));
214 214
 	}
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 		$request = $signedRequest->getOutgoingRequest();
281 281
 
282 282
 		$data = new SimpleDataStore();
283
-		$data->s('(request-target)', NCRequest::method($request->getType()) . ' ' . $request->getPath())
283
+		$data->s('(request-target)', NCRequest::method($request->getType()).' '.$request->getPath())
284 284
 			->sInt('content-length', strlen($signedRequest->getBody()))
285 285
 			->s('date', gmdate($this->dateHeader))
286 286
 			->s('digest', $signedRequest->getDigest())
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
 		foreach ($data->keys() as $element) {
300 300
 			try {
301 301
 				$value = $data->gItem($element);
302
-				$signing[] = $element . ': ' . $value;
302
+				$signing[] = $element.': '.$value;
303 303
 				if ($element !== '(request-target)') {
304 304
 					$signedRequest->getOutgoingRequest()->addHeader($element, $value);
305 305
 				}
@@ -332,10 +332,10 @@  discard block
 block discarded – undo
332 332
 		$headers = array_diff($signedRequest->getSignatureHeader()->keys(), ['(request-target)']);
333 333
 		$signatory = $signedRequest->getSignatory();
334 334
 		$signatureElements = [
335
-			'keyId="' . $signatory->getKeyId() . '"',
336
-			'algorithm="' . $this->getChosenEncryption($signatory) . '"',
337
-			'headers="' . implode(' ', $headers) . '"',
338
-			'signature="' . $signedRequest->getSignedSignature() . '"'
335
+			'keyId="'.$signatory->getKeyId().'"',
336
+			'algorithm="'.$this->getChosenEncryption($signatory).'"',
337
+			'headers="'.implode(' ', $headers).'"',
338
+			'signature="'.$signedRequest->getSignedSignature().'"'
339 339
 		];
340 340
 
341 341
 		$signedRequest->getOutgoingRequest()->addHeader('Signature', implode(',', $signatureElements));
Please login to merge, or discard this patch.