Completed
Push — master ( 2ed78e...f31342 )
by
unknown
32s queued 28s
created
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/FileSharingTeamResourceProvider.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -59,18 +59,18 @@  discard block
 block discarded – undo
59 59
 		}
60 60
 
61 61
 		$shares = $this->shareByCircleProvider->getSharesToCircle($teamId);
62
-		usort($shares, function ($a, $b) {
62
+		usort($shares, function($a, $b) {
63 63
 			return (int)($b->getItemType() === 'folder') - (int)($a->getItemType() === 'folder');
64 64
 		});
65
-		return array_map(function (ShareWrapper $shareWrapper) {
65
+		return array_map(function(ShareWrapper $shareWrapper) {
66 66
 			$isFolder = $shareWrapper->getItemType() === 'folder';
67 67
 			return new TeamResource(
68 68
 				$this,
69 69
 				(string)$shareWrapper->getFileSource(),
70 70
 				basename($shareWrapper->getFileTarget()),
71
-				$this->urlGenerator->getAbsoluteURL('/index.php/f/' . $shareWrapper->getFileSource()),
71
+				$this->urlGenerator->getAbsoluteURL('/index.php/f/'.$shareWrapper->getFileSource()),
72 72
 				iconSvg: $isFolder ? '<svg xmlns="http://www.w3.org/2000/svg" id="mdi-folder" viewBox="0 0 24 24"><path d="M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z" /></svg>' : null,
73
-				iconURL: !$isFolder ?
73
+				iconURL : !$isFolder ?
74 74
 					$this->urlGenerator->linkToRouteAbsolute('core.preview.getPreviewByFileId', ['fileId' => $shareWrapper->getFileSource(), 'mimeFallback' => true, ])
75 75
 					: null,
76 76
 			);
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 			return false;
83 83
 		}
84 84
 
85
-		return count(array_filter($this->getSharedWith($teamId), function (TeamResource $resource) use ($resourceId) {
85
+		return count(array_filter($this->getSharedWith($teamId), function(TeamResource $resource) use ($resourceId) {
86 86
 			return $resource->getId() === $resourceId;
87 87
 		})) !== 0;
88 88
 	}
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 
95 95
 		$shares = $this->shareByCircleProvider->getSharesByFileId((int)$resourceId);
96 96
 
97
-		return array_map(function ($share) {
97
+		return array_map(function($share) {
98 98
 			return $share->getSharedWith();
99 99
 		}, $shares);
100 100
 	}
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/Circles/FileSharingBroadcaster.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 			$this->miscService = OC::$server->query(MiscService::class);
115 115
 		} catch (QueryException $e) {
116 116
 			OC::$server->getLogger()
117
-				->log(1, 'Circles: cannot init FileSharingBroadcaster - ' . $e->getMessage());
117
+				->log(1, 'Circles: cannot init FileSharingBroadcaster - '.$e->getMessage());
118 118
 		}
119 119
 
120 120
 		try {
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
 
260 260
 		$allShares = $this->fileSharesRequest->getSharesForCircle($member->getCircleId());
261 261
 		$knownShares = array_map(
262
-			function (SharesToken $shareToken) {
262
+			function(SharesToken $shareToken) {
263 263
 				return $shareToken->getShareId();
264 264
 			},
265 265
 			$this->tokensRequest->getTokensFromMember($member)
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
 	 * @throws IllegalIDChangeException
307 307
 	 */
308 308
 	private function generateShare($data): IShare {
309
-		$this->logger->log(0, 'Regenerate shares from payload: ' . json_encode($data));
309
+		$this->logger->log(0, 'Regenerate shares from payload: '.json_encode($data));
310 310
 
311 311
 		$share = new Share($this->rootFolder, $this->userManager);
312 312
 		$share->setId($data['id']);
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
 			$this->sendPasswordByMail($share, $displayName, $email, $password);
400 400
 		} catch (Exception $e) {
401 401
 			OC::$server->getLogger()
402
-				->log(1, 'Circles::sharedByMail - mail were not sent: ' . $e->getMessage());
402
+				->log(1, 'Circles::sharedByMail - mail were not sent: '.$e->getMessage());
403 403
 		}
404 404
 	}
405 405
 
@@ -417,8 +417,8 @@  discard block
 block discarded – undo
417 417
 		$message = $this->mailer->createMessage();
418 418
 
419 419
 		$this->logger->log(
420
-			0, "Sending mail to circle '" . $circleName . "': " . $email . ' file: ' . $fileName
421
-			   . ' - link: ' . $link
420
+			0, "Sending mail to circle '".$circleName."': ".$email.' file: '.$fileName
421
+			   . ' - link: '.$link
422 422
 		);
423 423
 
424 424
 		$subject = $this->l10n->t('%s shared »%s« with you.', [$author, $fileName]);
@@ -456,7 +456,7 @@  discard block
 block discarded – undo
456 456
 
457 457
 		$message = $this->mailer->createMessage();
458 458
 
459
-		$this->logger->log(0, "Sending password mail to circle '" . $circleName . "': " . $email);
459
+		$this->logger->log(0, "Sending password mail to circle '".$circleName."': ".$email);
460 460
 
461 461
 		$filename = $share->getNode()
462 462
 			->getName();
@@ -511,7 +511,7 @@  discard block
 block discarded – undo
511 511
 		$message->setFrom([\OCP\Util::getDefaultEmailAddress($instanceName) => $senderName]);
512 512
 		if ($initiatorEmailAddress !== null) {
513 513
 			$message->setReplyTo([$initiatorEmailAddress => $initiatorDisplayName]);
514
-			$emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan());
514
+			$emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan());
515 515
 		} else {
516 516
 			$emailTemplate->addFooter();
517 517
 		}
@@ -546,7 +546,7 @@  discard block
 block discarded – undo
546 546
 		$emailTemplate->addHeader();
547 547
 		$emailTemplate->addHeading($subject, false);
548 548
 		$emailTemplate->addBodyText(
549
-			htmlspecialchars($text) . '<br>' . htmlspecialchars(
549
+			htmlspecialchars($text).'<br>'.htmlspecialchars(
550 550
 				$this->l10n->t('Click the button below to open it.')
551 551
 			), $text
552 552
 		);
@@ -592,7 +592,7 @@  discard block
 block discarded – undo
592 592
 			$this->sendMailExistingShares($template, $author->getCachedName(), $recipient);
593 593
 			$this->sendPasswordExistingShares($author, $recipient, $password);
594 594
 		} catch (Exception $e) {
595
-			$this->logger->log(2, 'Failed to send mail about existing share ' . $e->getMessage());
595
+			$this->logger->log(2, 'Failed to send mail about existing share '.$e->getMessage());
596 596
 		}
597 597
 	}
598 598
 
@@ -615,7 +615,7 @@  discard block
 block discarded – undo
615 615
 		$authorName = ($authorUser instanceof IUser) ? $authorUser->getDisplayName() : $author;
616 616
 		$authorEmail = ($authorUser instanceof IUser) ? $authorUser->getEMailAddress() : null;
617 617
 
618
-		$this->logger->log(0, "Sending password mail about existing files to '" . $email . "'");
618
+		$this->logger->log(0, "Sending password mail about existing files to '".$email."'");
619 619
 
620 620
 		$plainBodyPart = $this->l10n->t(
621 621
 			"%1\$s shared multiple files with you.\nYou should have already received a separate email with a link to access them.\n",
@@ -657,7 +657,7 @@  discard block
 block discarded – undo
657 657
 		$message->setFrom([\OCP\Util::getDefaultEmailAddress($instanceName) => $senderName]);
658 658
 		if ($authorEmail !== null) {
659 659
 			$message->setReplyTo([$authorEmail => $authorName]);
660
-			$emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan());
660
+			$emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan());
661 661
 		} else {
662 662
 			$emailTemplate->addFooter();
663 663
 		}
@@ -702,7 +702,7 @@  discard block
 block discarded – undo
702 702
 	 */
703 703
 	protected function generateMailExitingShares($author, $circleName) {
704 704
 		$this->logger->log(
705
-			0, "Generating mail about existing share mail from '" . $author . "' in "
705
+			0, "Generating mail about existing share mail from '".$author."' in "
706 706
 			   . $circleName
707 707
 		);
708 708
 
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.
lib/Tools/Model/NCSignedRequest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@
 block discarded – undo
115 115
 	 */
116 116
 	public function setBody(string $body): self {
117 117
 		$this->body = $body;
118
-		$this->setDigest('SHA-256=' . base64_encode(hash('sha256', utf8_encode($body), true)));
118
+		$this->setDigest('SHA-256='.base64_encode(hash('sha256', utf8_encode($body), true)));
119 119
 
120 120
 		return $this;
121 121
 	}
Please login to merge, or discard this patch.
lib/Command/MembersList.php 1 patch
Spacing   +16 added lines, -17 removed lines patch added patch discarded remove patch
@@ -167,11 +167,11 @@  discard block
 block discarded – undo
167 167
 			$this->federatedUserService->commandLineInitiator($initiator, $initiatorType, $circleId, true);
168 168
 			$circle = $this->circleService->getCircle($circleId);
169 169
 
170
-			$output->writeln('<info>Name</info>: ' . $circle->getName());
170
+			$output->writeln('<info>Name</info>: '.$circle->getName());
171 171
 			$owner = $circle->getOwner();
172
-			$output->writeln('<info>Owner</info>: ' . $owner->getUserId() . '@' . $owner->getInstance());
172
+			$output->writeln('<info>Owner</info>: '.$owner->getUserId().'@'.$owner->getInstance());
173 173
 			$type = implode(', ', Circle::getCircleFlags($circle, Circle::FLAGS_LONG));
174
-			$output->writeln('<info>Config</info>: ' . $type);
174
+			$output->writeln('<info>Config</info>: '.$type);
175 175
 			$output->writeln(' ');
176 176
 
177 177
 			$tree = new TreeNode(null, new SimpleDataStore(['circle' => $circle]));
@@ -236,8 +236,7 @@  discard block
 block discarded – undo
236 236
 						$member,
237 237
 						$this->input->getOption('display-name')
238 238
 					),
239
-					($level > 0) ? Member::$DEF_LEVEL[$level] :
240
-						'(' . strtolower($member->getStatus()) . ')',
239
+					($level > 0) ? Member::$DEF_LEVEL[$level] : '('.strtolower($member->getStatus()).')',
241 240
 					($member->hasInvitedBy()) ? $this->configService->displayFederatedUser(
242 241
 						$member->getInvitedBy(),
243 242
 						$this->input->getOption('display-name')
@@ -327,7 +326,7 @@  discard block
 block discarded – undo
327 326
 							$circle = $this->remoteService->getCircleFromInstance(
328 327
 								$member->getSingleId(), $member->getInstance(), $data
329 328
 							);
330
-						} catch (CircleNotFoundException|RemoteInstanceException $e) {
329
+						} catch (CircleNotFoundException | RemoteInstanceException $e) {
331 330
 						}
332 331
 					} else {
333 332
 						$this->federatedUserService->commandLineInitiator(
@@ -403,14 +402,14 @@  discard block
 block discarded – undo
403 402
 				$member = $data->gObj('member', Member::class);
404 403
 
405 404
 				if ($lineNumber === 1) {
406
-					$line .= '<info>' . $member->getSingleId() . '</info>';
405
+					$line .= '<info>'.$member->getSingleId().'</info>';
407 406
 					if (!$this->configService->isLocalInstance($member->getInstance())) {
408
-						$line .= '@' . $member->getInstance();
407
+						$line .= '@'.$member->getInstance();
409 408
 					}
410
-					$line .= ' (' . Member::$DEF_LEVEL[$member->getLevel()] . ')';
409
+					$line .= ' ('.Member::$DEF_LEVEL[$member->getLevel()].')';
411 410
 
412
-					$line .= ' <info>MemberId</info>: ' . $member->getId();
413
-					$line .= ' <info>Name</info>: ' . $this->configService->displayFederatedUser(
411
+					$line .= ' <info>MemberId</info>: '.$member->getId();
412
+					$line .= ' <info>Name</info>: '.$this->configService->displayFederatedUser(
414 413
 						$member,
415 414
 						$this->input->getOption('display-name')
416 415
 					);
@@ -418,7 +417,7 @@  discard block
 block discarded – undo
418 417
 						$line .= ' <info>Source</info>: '
419 418
 								 . Circle::$DEF_SOURCE[$member->getBasedOn()->getSource()];
420 419
 					} else {
421
-						$line .= ' <info>Type</info>: ' . Member::$TYPE[$member->getUserType()];
420
+						$line .= ' <info>Type</info>: '.Member::$TYPE[$member->getUserType()];
422 421
 					}
423 422
 				}
424 423
 
@@ -431,21 +430,21 @@  discard block
 block discarded – undo
431 430
 						return $line;
432 431
 					}
433 432
 					$owner = $circle->getOwner();
434
-					$line .= '<info>Owner</info>: ' . $owner->getUserId() . '@' . $owner->getInstance();
433
+					$line .= '<info>Owner</info>: '.$owner->getUserId().'@'.$owner->getInstance();
435 434
 					$type = implode(', ', Circle::getCircleFlags($circle, Circle::FLAGS_LONG));
436
-					$line .= ($type === '') ? '' : ' <info>Config</info>: ' . $type;
435
+					$line .= ($type === '') ? '' : ' <info>Config</info>: '.$type;
437 436
 				}
438 437
 			} else {
439 438
 				if ($lineNumber === 1 && !is_null($circle)) {
440
-					$line .= '<info>' . $circle->getSingleId() . '</info>';
439
+					$line .= '<info>'.$circle->getSingleId().'</info>';
441 440
 					if (!$this->configService->isLocalInstance($circle->getInstance())) {
442
-						$line .= '@' . $circle->getInstance();
441
+						$line .= '@'.$circle->getInstance();
443 442
 					}
444 443
 				}
445 444
 			}
446 445
 
447 446
 			return $line;
448
-		} catch (InvalidItemException|ItemNotFoundException|UnknownTypeException $e) {
447
+		} catch (InvalidItemException | ItemNotFoundException | UnknownTypeException $e) {
449 448
 		}
450 449
 
451 450
 		return '';
Please login to merge, or discard this patch.