Completed
Pull Request — master (#2174)
by
unknown
30s
created
lib/AppInfo/Application.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@
 block discarded – undo
133 133
 	 * @throws Throwable
134 134
 	 */
135 135
 	public function boot(IBootContext $context): void {
136
-		$context->injectFn(function (IShareManager $shareManager) {
136
+		$context->injectFn(function(IShareManager $shareManager) {
137 137
 			$shareManager->registerShareProvider(ShareByCircleProvider::class);
138 138
 		});
139 139
 
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
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 			$this->configService = Server::get(ConfigService::class);
116 116
 			$this->miscService = Server::get(MiscService::class);
117 117
 		} catch (ContainerExceptionInterface $e) {
118
-			$this->logger->info('Circles: cannot init FileSharingBroadcaster - ' . $e->getMessage(), ['exception' => $e]);
118
+			$this->logger->info('Circles: cannot init FileSharingBroadcaster - '.$e->getMessage(), ['exception' => $e]);
119 119
 		}
120 120
 
121 121
 		try {
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
 
261 261
 		$allShares = $this->fileSharesRequest->getSharesForCircle($member->getCircleId());
262 262
 		$knownShares = array_map(
263
-			function (SharesToken $shareToken) {
263
+			function(SharesToken $shareToken) {
264 264
 				return $shareToken->getShareId();
265 265
 			},
266 266
 			$this->tokensRequest->getTokensFromMember($member)
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
 	 * @throws IllegalIDChangeException
308 308
 	 */
309 309
 	private function generateShare($data): IShare {
310
-		$this->logger->log(0, 'Regenerate shares from payload: ' . json_encode($data));
310
+		$this->logger->log(0, 'Regenerate shares from payload: '.json_encode($data));
311 311
 
312 312
 		$share = new Share($this->rootFolder, $this->userManager);
313 313
 		$share->setId($data['id']);
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
 			);
400 400
 			$this->sendPasswordByMail($share, $displayName, $email, $password);
401 401
 		} catch (Exception $e) {
402
-			$this->logger->info('Circles::sharedByMail - mail were not sent: ' . $e->getMessage(), ['exception' => $e]);
402
+			$this->logger->info('Circles::sharedByMail - mail were not sent: '.$e->getMessage(), ['exception' => $e]);
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([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([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/Service/ConfigService.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 			return $value;
223 223
 		}
224 224
 
225
-		if (($value = $this->config->getSystemValue(Application::APP_ID . '.' . $key, '')) !== '') {
225
+		if (($value = $this->config->getSystemValue(Application::APP_ID.'.'.$key, '')) !== '') {
226 226
 			return $value;
227 227
 		}
228 228
 
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
 	 * @return bool
364 364
 	 */
365 365
 	public function enforcePasswordOnSharedFile(Circle $circle): bool {
366
-		if ($this->globalAppConfig->getValueBool( 'core', 'shareapi_enforce_links_password')) {
366
+		if ($this->globalAppConfig->getValueBool('core', 'shareapi_enforce_links_password')) {
367 367
 			return true;
368 368
 		}
369 369
 
@@ -472,7 +472,7 @@  discard block
 block discarded – undo
472 472
 	 */
473 473
 	public function getTrustedDomains(): array {
474 474
 		return array_map(
475
-			function (string $address) {
475
+			function(string $address) {
476 476
 				return strtolower($address);
477 477
 			}, $this->config->getSystemValue('trusted_domains', [])
478 478
 		);
@@ -508,7 +508,7 @@  discard block
 block discarded – undo
508 508
 		}
509 509
 
510 510
 		if (array_key_exists('port', $loopback)) {
511
-			$loopbackCloudId = $loopback['host'] . ':' . $loopback['port'];
511
+			$loopbackCloudId = $loopback['host'].':'.$loopback['port'];
512 512
 		} else {
513 513
 			$loopbackCloudId = $loopback['host'];
514 514
 		}
@@ -547,13 +547,13 @@  discard block
 block discarded – undo
547 547
 			$path = $this->getAppValue(self::LOOPBACK_CLOUD_PATH);
548 548
 		}
549 549
 
550
-		$base = $scheme . '://' . $instance . $path;
550
+		$base = $scheme.'://'.$instance.$path;
551 551
 
552 552
 		if ($route === '') {
553 553
 			return $base;
554 554
 		}
555 555
 
556
-		return rtrim($base, '/') . $this->linkToRoute($route, $args);
556
+		return rtrim($base, '/').$this->linkToRoute($route, $args);
557 557
 	}
558 558
 
559 559
 
@@ -658,7 +658,7 @@  discard block
 block discarded – undo
658 658
 	): string {
659 659
 		$name = ($displayName) ? $federatedUser->getDisplayName() : $federatedUser->getUserId();
660 660
 		if ($federatedUser->getUserType() === Member::TYPE_MAIL) {
661
-			return $name . ' ' . $this->displayInstance(
661
+			return $name.' '.$this->displayInstance(
662 662
 				$federatedUser->getInstance(),
663 663
 				self::DISPLAY_PARENTHESIS
664 664
 			);
@@ -668,7 +668,7 @@  discard block
 block discarded – undo
668 668
 			return $name;
669 669
 		}
670 670
 
671
-		return $name . $this->displayInstance($federatedUser->getInstance(), self::DISPLAY_AT);
671
+		return $name.$this->displayInstance($federatedUser->getInstance(), self::DISPLAY_AT);
672 672
 	}
673 673
 
674 674
 	/**
@@ -684,9 +684,9 @@  discard block
 block discarded – undo
684 684
 
685 685
 		switch ($type) {
686 686
 			case self::DISPLAY_AT:
687
-				return '@' . $instance;
687
+				return '@'.$instance;
688 688
 			case self::DISPLAY_PARENTHESIS:
689
-				return '(' . $instance . ')';
689
+				return '('.$instance.')';
690 690
 		}
691 691
 
692 692
 		return $instance;
@@ -738,7 +738,7 @@  discard block
 block discarded – undo
738 738
 			// when running from the occ command, /index.php is not removed by itself
739 739
 			if (str_starts_with($path, '/index.php/')
740 740
 				&& $this->config->getSystemValueString('htaccess.RewriteBase', '') !== '') {
741
-				$path = $this->config->getSystemValueString('htaccess.RewriteBase', '/') . substr($path, 11);
741
+				$path = $this->config->getSystemValueString('htaccess.RewriteBase', '/').substr($path, 11);
742 742
 			}
743 743
 
744 744
 			$knownPath = parse_url($this->config->getSystemValue('overwrite.cli.url'), PHP_URL_PATH);
Please login to merge, or discard this patch.