Completed
Pull Request — master (#2007)
by
unknown
27s
created
lib/Db/MemberRequest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -253,8 +253,8 @@  discard block
 block discarded – undo
253 253
 			$qb->filterDirectMembership(CoreQueryBuilder::MEMBER, $probe->getFilterMember());
254 254
 		}
255 255
 
256
-		$qb->orderBy($qb->getDefaultSelectAlias() . '.level', 'desc');
257
-		$qb->addOrderBy($qb->getDefaultSelectAlias() . '.cached_name', 'asc');
256
+		$qb->orderBy($qb->getDefaultSelectAlias().'.level', 'desc');
257
+		$qb->addOrderBy($qb->getDefaultSelectAlias().'.cached_name', 'asc');
258 258
 
259 259
 		return $this->getItemsFromRequest($qb);
260 260
 	}
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 		$qb->limitToMembersByInheritance(CoreQueryBuilder::MEMBER, $singleId, $level);
280 280
 
281 281
 		$aliasMembership = $qb->generateAlias(CoreQueryBuilder::MEMBER, CoreQueryBuilder::MEMBERSHIPS);
282
-		$qb->orderBy($aliasMembership . '.inheritance_depth', 'asc');
282
+		$qb->orderBy($aliasMembership.'.inheritance_depth', 'asc');
283 283
 
284 284
 		return $this->getItemsFromRequest($qb);
285 285
 	}
@@ -347,10 +347,10 @@  discard block
 block discarded – undo
347 347
 		$qb = $this->getMemberSelectSql();
348 348
 		$qb->limitToCircleId($circleId);
349 349
 
350
-		$qb->andwhere($qb->expr()->nonEmptyString(CoreQueryBuilder::MEMBER . '.instance'));
350
+		$qb->andwhere($qb->expr()->nonEmptyString(CoreQueryBuilder::MEMBER.'.instance'));
351 351
 
352 352
 		return array_map(
353
-			function (Member $member): string {
353
+			function(Member $member): string {
354 354
 				return $member->getInstance();
355 355
 			}, $this->getItemsFromRequest($qb)
356 356
 		);
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
 	 */
401 401
 	public function searchFederatedUsers(string $needle): array {
402 402
 		$qb = $this->getMemberSelectSql();
403
-		$qb->searchInDBField('user_id', '%' . $needle . '%');
403
+		$qb->searchInDBField('user_id', '%'.$needle.'%');
404 404
 
405 405
 		return $this->getItemsFromRequest($qb, true);
406 406
 	}
Please login to merge, or discard this patch.
lib/Db/CircleRequestBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
 		$qb->generateSelect(self::TABLE_CIRCLE, self::$tables[self::TABLE_CIRCLE], $alias);
81 81
 
82 82
 		if (!$single) {
83
-			$qb->orderBy($alias . '.creation', 'asc');
83
+			$qb->orderBy($alias.'.creation', 'asc');
84 84
 		}
85 85
 
86 86
 		return $qb;
Please login to merge, or discard this patch.
lib/Tools/Traits/TNCRequest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -169,10 +169,10 @@
 block discarded – undo
169 169
 				return $client->delete($request->getCompleteUrl(), $request->getClientOptions());
170 170
 			case Request::TYPE_GET:
171 171
 				return $client->get(
172
-					$request->getCompleteUrl() . $request->getQueryString(), $request->getClientOptions()
172
+					$request->getCompleteUrl().$request->getQueryString(), $request->getClientOptions()
173 173
 				);
174 174
 			default:
175
-				throw new Exception('unknown request type ' . json_encode($request));
175
+				throw new Exception('unknown request type '.json_encode($request));
176 176
 		}
177 177
 	}
178 178
 }
Please login to merge, or discard this patch.
lib/Tools/Model/Request.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 	public function getInstance(): string {
258 258
 		$instance = $this->getHost();
259 259
 		if ($this->getPort() > 0) {
260
-			$instance .= ':' . $this->getPort();
260
+			$instance .= ':'.$this->getPort();
261 261
 		}
262 262
 
263 263
 		return $instance;
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
 		if ($protocol === null) {
282 282
 			if (strpos($url, '/') > -1) {
283 283
 				[$address, $baseUrl] = explode('/', $url, 2);
284
-				$this->setBaseUrl('/' . $baseUrl);
284
+				$this->setBaseUrl('/'.$baseUrl);
285 285
 			} else {
286 286
 				$address = $url;
287 287
 			}
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
 				continue;
392 392
 			}
393 393
 
394
-			$url = str_replace(':' . $k, $this->data[$k], $url);
394
+			$url = str_replace(':'.$k, $this->data[$k], $url);
395 395
 		}
396 396
 
397 397
 		return $url;
@@ -408,7 +408,7 @@  discard block
 block discarded – undo
408 408
 				continue;
409 409
 			}
410 410
 
411
-			$url = str_replace(':' . $k, $this->params[$k], $url);
411
+			$url = str_replace(':'.$k, $this->params[$k], $url);
412 412
 		}
413 413
 
414 414
 		return $url;
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
 	 * @return string
420 420
 	 */
421 421
 	public function getPath(): string {
422
-		return $this->baseUrl . $this->url;
422
+		return $this->baseUrl.$this->url;
423 423
 	}
424 424
 
425 425
 
@@ -436,9 +436,9 @@  discard block
 block discarded – undo
436 436
 	 * @return string
437 437
 	 */
438 438
 	public function getCompleteUrl(): string {
439
-		$port = ($this->getPort() > 0) ? ':' . $this->getPort() : '';
439
+		$port = ($this->getPort() > 0) ? ':'.$this->getPort() : '';
440 440
 
441
-		return $this->getUsedProtocol() . '://' . $this->getHost() . $port . $this->getParametersUrl();
441
+		return $this->getUsedProtocol().'://'.$this->getHost().$port.$this->getParametersUrl();
442 442
 	}
443 443
 
444 444
 
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
 	public function addHeader($key, $value): Request {
454 454
 		$header = $this->get($key, $this->headers);
455 455
 		if ($header !== '') {
456
-			$header .= ', ' . $value;
456
+			$header .= ', '.$value;
457 457
 		} else {
458 458
 			$header = $value;
459 459
 		}
@@ -683,11 +683,11 @@  discard block
 block discarded – undo
683 683
 
684 684
 		switch ($this->getQueryStringType()) {
685 685
 			case self::QS_VAR_ARRAY:
686
-				return '?' . http_build_query($this->getParams());
686
+				return '?'.http_build_query($this->getParams());
687 687
 
688 688
 			case self::QS_VAR_DUPLICATE:
689 689
 			default:
690
-				return '?' . preg_replace(
690
+				return '?'.preg_replace(
691 691
 					'/%5B(?:[0-9]|[1-9][0-9]+)%5D=/', '=', http_build_query($this->getParams())
692 692
 				);
693 693
 		}
Please login to merge, or discard this patch.
lib/Db/ShareWrapperRequest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
 		if ($shallow) {
383 383
 			$qb->limitInt('parent', $node->getId(), $aliasFileCache);
384 384
 		} else {
385
-			$qb->like('path', $node->getInternalPath() . '/%', $aliasFileCache);
385
+			$qb->like('path', $node->getInternalPath().'/%', $aliasFileCache);
386 386
 		}
387 387
 		$qb->limitNull('parent', false);
388 388
 
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
 		}
443 443
 
444 444
 		$ids = array_map(
445
-			function (ShareWrapper $share): string {
445
+			function(ShareWrapper $share): string {
446 446
 				return $share->getId();
447 447
 			},
448 448
 			$this->getItemsFromRequest($qb)
@@ -457,7 +457,7 @@  discard block
 block discarded – undo
457 457
 		$expr = $qb->expr();
458 458
 		$qb->leftJoin(
459 459
 			CoreQueryBuilder::SHARE, CoreRequestBuilder::TABLE_SHARE, 'p',
460
-			$expr->andX($expr->eq('p.id', CoreQueryBuilder::SHARE . '.parent'))
460
+			$expr->andX($expr->eq('p.id', CoreQueryBuilder::SHARE.'.parent'))
461 461
 		);
462 462
 
463 463
 		$qb->filterNull('parent');
Please login to merge, or discard this patch.
lib/Service/CircleService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -580,7 +580,7 @@  discard block
 block discarded – undo
580 580
 
581 581
 		$i = 1;
582 582
 		while (true) {
583
-			$testDisplayName = $baseDisplayName . (($i > 1) ? ' (' . $i . ')' : '');
583
+			$testDisplayName = $baseDisplayName.(($i > 1) ? ' ('.$i.')' : '');
584 584
 			$test = new Circle();
585 585
 			$test->setDisplayName($testDisplayName);
586 586
 
@@ -613,7 +613,7 @@  discard block
 block discarded – undo
613 613
 
614 614
 		$i = 1;
615 615
 		while (true) {
616
-			$testSanitizedName = $baseSanitizedName . (($i > 1) ? ' (' . $i . ')' : '');
616
+			$testSanitizedName = $baseSanitizedName.(($i > 1) ? ' ('.$i.')' : '');
617 617
 
618 618
 			$test = new Circle();
619 619
 			$test->setSanitizedName($testSanitizedName);
@@ -755,7 +755,7 @@  discard block
 block discarded – undo
755 755
 
756 756
 
757 757
 	private function generateGetCirclesCacheKey(FederatedUser $federatedUser, string $probeSum): string {
758
-		return $federatedUser->getSingleId() . '#' . $probeSum;
758
+		return $federatedUser->getSingleId().'#'.$probeSum;
759 759
 	}
760 760
 
761 761
 
Please login to merge, or discard this patch.
lib/Listeners/Files/RemovingMember.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 		$singleIds = array_merge(
99 99
 			[$circle->getSingleId()],
100 100
 			array_map(
101
-				function (Membership $membership) {
101
+				function(Membership $membership) {
102 102
 					return $membership->getCircleId();
103 103
 				}, $circle->getMemberships()
104 104
 			)
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 			try {
153 153
 				$this->shareWrapperService->deleteUserSharesToCircle($singleId, $member->getUserId());
154 154
 			} catch (\Exception $e) {
155
-				$this->logger->notice('issue while deleting user shares: ' . $e->getMessage());
155
+				$this->logger->notice('issue while deleting user shares: '.$e->getMessage());
156 156
 			}
157 157
 		}
158 158
 	}
Please login to merge, or discard this patch.
lib/Db/EventWrapperRequest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@
 block discarded – undo
105 105
 				$qb->exprLimitInt('status', EventWrapper::STATUS_FAILED),
106 106
 				$expr->andX(
107 107
 					$qb->exprLimitInt('status', EventWrapper::STATUS_INIT),
108
-					$qb->exprGt('creation', time() - 86400),  // only freshly created; less than 3 hours
108
+					$qb->exprGt('creation', time() - 86400), // only freshly created; less than 3 hours
109 109
 					$qb->exprLt('creation', time() - 900)     // but not too fresh, at least 15 minutes
110 110
 				)
111 111
 			)
Please login to merge, or discard this patch.
lib/Service/ConfigService.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
 			return $value;
245 245
 		}
246 246
 
247
-		if (($value = $this->config->getSystemValue(Application::APP_ID . '.' . $key, '')) !== '') {
247
+		if (($value = $this->config->getSystemValue(Application::APP_ID.'.'.$key, '')) !== '') {
248 248
 			return $value;
249 249
 		}
250 250
 
@@ -498,7 +498,7 @@  discard block
 block discarded – undo
498 498
 	 */
499 499
 	public function getTrustedDomains(): array {
500 500
 		return array_map(
501
-			function (string $address) {
501
+			function(string $address) {
502 502
 				return strtolower($address);
503 503
 			}, $this->config->getSystemValue('trusted_domains', [])
504 504
 		);
@@ -534,7 +534,7 @@  discard block
 block discarded – undo
534 534
 		}
535 535
 
536 536
 		if (array_key_exists('port', $loopback)) {
537
-			$loopbackCloudId = $loopback['host'] . ':' . $loopback['port'];
537
+			$loopbackCloudId = $loopback['host'].':'.$loopback['port'];
538 538
 		} else {
539 539
 			$loopbackCloudId = $loopback['host'];
540 540
 		}
@@ -573,13 +573,13 @@  discard block
 block discarded – undo
573 573
 			$path = $this->getAppValue(self::LOOPBACK_CLOUD_PATH);
574 574
 		}
575 575
 
576
-		$base = $scheme . '://' . $instance . $path;
576
+		$base = $scheme.'://'.$instance.$path;
577 577
 
578 578
 		if ($route === '') {
579 579
 			return $base;
580 580
 		}
581 581
 
582
-		return rtrim($base, '/') . $this->linkToRoute($route, $args);
582
+		return rtrim($base, '/').$this->linkToRoute($route, $args);
583 583
 	}
584 584
 
585 585
 
@@ -684,7 +684,7 @@  discard block
 block discarded – undo
684 684
 	): string {
685 685
 		$name = ($displayName) ? $federatedUser->getDisplayName() : $federatedUser->getUserId();
686 686
 		if ($federatedUser->getUserType() === Member::TYPE_MAIL) {
687
-			return $name . ' ' . $this->displayInstance(
687
+			return $name.' '.$this->displayInstance(
688 688
 				$federatedUser->getInstance(),
689 689
 				self::DISPLAY_PARENTHESIS
690 690
 			);
@@ -694,7 +694,7 @@  discard block
 block discarded – undo
694 694
 			return $name;
695 695
 		}
696 696
 
697
-		return $name . $this->displayInstance($federatedUser->getInstance(), self::DISPLAY_AT);
697
+		return $name.$this->displayInstance($federatedUser->getInstance(), self::DISPLAY_AT);
698 698
 	}
699 699
 
700 700
 	/**
@@ -710,9 +710,9 @@  discard block
 block discarded – undo
710 710
 
711 711
 		switch ($type) {
712 712
 			case self::DISPLAY_AT:
713
-				return '@' . $instance;
713
+				return '@'.$instance;
714 714
 			case self::DISPLAY_PARENTHESIS:
715
-				return '(' . $instance . ')';
715
+				return '('.$instance.')';
716 716
 		}
717 717
 
718 718
 		return $instance;
@@ -764,7 +764,7 @@  discard block
 block discarded – undo
764 764
 			// when running from the occ command, /index.php is not removed by itself
765 765
 			if (str_starts_with($path, '/index.php/')
766 766
 				&& $this->config->getSystemValueString('htaccess.RewriteBase', '') !== '') {
767
-				$path = $this->config->getSystemValueString('htaccess.RewriteBase', '/') . substr($path, 11);
767
+				$path = $this->config->getSystemValueString('htaccess.RewriteBase', '/').substr($path, 11);
768 768
 			}
769 769
 
770 770
 			$knownPath = parse_url($this->config->getSystemValue('overwrite.cli.url'), PHP_URL_PATH);
Please login to merge, or discard this patch.