Completed
Push — master ( e86b33...3d25a7 )
by Maxence
22s
created
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/Command/CirclesMaintenance.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 				'<error>WARNING! You are about to delete all data related to the Circles App!</error>'
109 109
 			);
110 110
 			$question = new ConfirmationQuestion(
111
-				'<comment>Do you really want to ' . $action . ' Circles ?</comment> (y/N) ', false,
111
+				'<comment>Do you really want to '.$action.' Circles ?</comment> (y/N) ', false,
112 112
 				'/^(y|Y)/i'
113 113
 			);
114 114
 
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 			$output->writeln('<error>WARNING! This operation is not reversible.</error>');
124 124
 
125 125
 			$question = new Question(
126
-				'<comment>Please confirm this destructive operation by typing \'' . $action
126
+				'<comment>Please confirm this destructive operation by typing \''.$action
127 127
 				. '\'</comment>: ', ''
128 128
 			);
129 129
 
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 				$this->coreRequestBuilder->uninstall();
141 141
 			}
142 142
 
143
-			$output->writeln('<info>' . $action . ' done</info>');
143
+			$output->writeln('<info>'.$action.' done</info>');
144 144
 
145 145
 			return 0;
146 146
 		}
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 		$federatedUser = $this->federatedUserService->getLocalFederatedUser($userId);
172 172
 		$displayName = $this->maintenanceService->updateDisplayName($federatedUser);
173 173
 		if ($displayName !== '') {
174
-			$output->writeln('Display name of ' . $federatedUser->getSingleId() . ' updated to ' . $displayName);
174
+			$output->writeln('Display name of '.$federatedUser->getSingleId().' updated to '.$displayName);
175 175
 		}
176 176
 
177 177
 		return 0;
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 			try {
187 187
 				$this->refreshSingleDisplayName($row['uid'], $output);
188 188
 			} catch (Exception $e) {
189
-				$output->writeln(get_class($e) . ' while trying to update display name of ' . $row['uid']);
189
+				$output->writeln(get_class($e).' while trying to update display name of '.$row['uid']);
190 190
 			}
191 191
 		}
192 192
 	}
Please login to merge, or discard this patch.
lib/ShareByCircleProvider.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
 
464 464
 		return array_filter(
465 465
 			array_map(
466
-				function (ShareWrapper $wrapper) {
466
+				function(ShareWrapper $wrapper) {
467 467
 					return $wrapper->getShare($this->rootFolder, $this->userManager, $this->urlGenerator);
468 468
 				}, $wrappedShares
469 469
 			)
@@ -515,7 +515,7 @@  discard block
 block discarded – undo
515 515
 
516 516
 		return array_filter(
517 517
 			array_map(
518
-				function (ShareWrapper $wrapper) {
518
+				function(ShareWrapper $wrapper) {
519 519
 					return $wrapper->getShare($this->rootFolder, $this->userManager, $this->urlGenerator);
520 520
 				}, $wrappedShares
521 521
 			)
@@ -564,7 +564,7 @@  discard block
 block discarded – undo
564 564
 
565 565
 		return array_filter(
566 566
 			array_map(
567
-				function (ShareWrapper $wrapper) {
567
+				function(ShareWrapper $wrapper) {
568 568
 					return $wrapper->getShare(
569 569
 						$this->rootFolder, $this->userManager, $this->urlGenerator, true
570 570
 					);
@@ -595,7 +595,7 @@  discard block
 block discarded – undo
595 595
 
596 596
 		$share = $wrappedShare->getShare($this->rootFolder, $this->userManager, $this->urlGenerator);
597 597
 		if ($share->getPassword() !== '') {
598
-			$this->logger->notice('share is protected by a password, hash: ' . $share->getPassword());
598
+			$this->logger->notice('share is protected by a password, hash: '.$share->getPassword());
599 599
 		}
600 600
 
601 601
 		return $share;
@@ -663,7 +663,7 @@  discard block
 block discarded – undo
663 663
 		$users = $remote = $mails = [];
664 664
 		$shares = $this->shareWrapperService->getSharesByFileIds($ids, true);
665 665
 
666
-		foreach($shares as $share) {
666
+		foreach ($shares as $share) {
667 667
 			$circle = $share->getCircle();
668 668
 			foreach ($circle->getInheritedMembers() as $member) {
669 669
 				switch ($member->getUserType()) {
@@ -674,7 +674,7 @@  discard block
 block discarded – undo
674 674
 							}
675 675
 						} else {
676 676
 							if (!in_array($member->getUserId(), $remote)) {
677
-								$remote[] = $member->getUserid() . '@' . $member->getInstance();
677
+								$remote[] = $member->getUserid().'@'.$member->getInstance();
678 678
 							}
679 679
 						}
680 680
 						break;
Please login to merge, or discard this patch.
lib/Tools/Db/ExtendedQueryBuilder.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 	 */
216 216
 	public function limitToCreation(int $delay = 0): self {
217 217
 		$date = new DateTime('now');
218
-		$date->sub(new DateInterval('PT' . $delay . 'M'));
218
+		$date->sub(new DateInterval('PT'.$delay.'M'));
219 219
 
220 220
 		$this->limitToDBFieldDateTime('creation', $date, true);
221 221
 
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
 		$expr = $this->expr();
233 233
 		$pf = ($this->getType() === DBALQueryBuilder::SELECT) ? $this->getDefaultSelectAlias()
234 234
 																. '.' : '';
235
-		$field = $pf . $field;
235
+		$field = $pf.$field;
236 236
 
237 237
 		$orX = $expr->orX();
238 238
 		$orX->add(
@@ -262,8 +262,8 @@  discard block
 block discarded – undo
262 262
 		}
263 263
 
264 264
 		$expr = $this->expr();
265
-		$pf = ($this->getType() === DBALQueryBuilder::SELECT) ? $this->getDefaultSelectAlias() . '.' : '';
266
-		$field = $pf . $field;
265
+		$pf = ($this->getType() === DBALQueryBuilder::SELECT) ? $this->getDefaultSelectAlias().'.' : '';
266
+		$field = $pf.$field;
267 267
 
268 268
 		$orX = $expr->orX();
269 269
 		$orX->add(
@@ -281,8 +281,8 @@  discard block
 block discarded – undo
281 281
 	public function searchInDBField(string $field, string $value): void {
282 282
 		$expr = $this->expr();
283 283
 
284
-		$pf = ($this->getType() === DBALQueryBuilder::SELECT) ? $this->getDefaultSelectAlias() . '.' : '';
285
-		$field = $pf . $field;
284
+		$pf = ($this->getType() === DBALQueryBuilder::SELECT) ? $this->getDefaultSelectAlias().'.' : '';
285
+		$field = $pf.$field;
286 286
 
287 287
 		$this->andWhere($expr->iLike($field, $this->createNamedParameter($value)));
288 288
 	}
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
 	 */
405 405
 	public function exprLike(string $field, string $value, string $alias = '', bool $cs = true): string {
406 406
 		if ($this->getType() === DBALQueryBuilder::SELECT) {
407
-			$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field;
407
+			$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field;
408 408
 		}
409 409
 
410 410
 		$expr = $this->expr();
@@ -417,7 +417,7 @@  discard block
 block discarded – undo
417 417
 
418 418
 	public function exprLimit(string $field, string $value, string $alias = '', bool $cs = true): string {
419 419
 		if ($this->getType() === DBALQueryBuilder::SELECT) {
420
-			$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field;
420
+			$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field;
421 421
 		}
422 422
 
423 423
 		$expr = $this->expr();
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
 
436 436
 	public function exprLimitInt(string $field, int $value, string $alias = ''): string {
437 437
 		if ($this->getType() === DBALQueryBuilder::SELECT) {
438
-			$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field;
438
+			$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field;
439 439
 		}
440 440
 
441 441
 		$expr = $this->expr();
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
 	 */
454 454
 	public function exprLimitBool(string $field, bool $value, string $alias = ''): string {
455 455
 		if ($this->getType() === DBALQueryBuilder::SELECT) {
456
-			$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field;
456
+			$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field;
457 457
 		}
458 458
 
459 459
 		$expr = $this->expr();
@@ -474,7 +474,7 @@  discard block
 block discarded – undo
474 474
 		string $alias = ''
475 475
 	): ICompositeExpression {
476 476
 		if ($this->getType() === DBALQueryBuilder::SELECT) {
477
-			$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field;
477
+			$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field;
478 478
 		}
479 479
 
480 480
 		$expr = $this->expr();
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
 		string $alias = ''
501 501
 	): ICompositeExpression {
502 502
 		if ($this->getType() === DBALQueryBuilder::SELECT) {
503
-			$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field;
503
+			$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field;
504 504
 		}
505 505
 
506 506
 		$expr = $this->expr();
@@ -550,7 +550,7 @@  discard block
 block discarded – undo
550 550
 	 */
551 551
 	public function exprLimitInArray(string $field, array $values, string $alias = ''): string {
552 552
 		if ($this->getType() === DBALQueryBuilder::SELECT) {
553
-			$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field;
553
+			$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field;
554 554
 		}
555 555
 
556 556
 		$expr = $this->expr();
@@ -568,7 +568,7 @@  discard block
 block discarded – undo
568 568
 	 */
569 569
 	public function exprLimitBitwise(string $field, int $flag, string $alias = ''): string {
570 570
 		if ($this->getType() === DBALQueryBuilder::SELECT) {
571
-			$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field;
571
+			$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field;
572 572
 		}
573 573
 
574 574
 		$expr = $this->expr();
@@ -590,7 +590,7 @@  discard block
 block discarded – undo
590 590
 	 */
591 591
 	public function exprLt(string $field, int $value, bool $lte = false, string $alias = ''): string {
592 592
 		if ($this->getType() === DBALQueryBuilder::SELECT) {
593
-			$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field;
593
+			$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field;
594 594
 		}
595 595
 
596 596
 		$expr = $this->expr();
@@ -612,7 +612,7 @@  discard block
 block discarded – undo
612 612
 	 */
613 613
 	public function exprGt(string $field, int $value, bool $gte = false, string $alias = ''): string {
614 614
 		if ($this->getType() === DBALQueryBuilder::SELECT) {
615
-			$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field;
615
+			$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field;
616 616
 		}
617 617
 
618 618
 		$expr = $this->expr();
@@ -721,7 +721,7 @@  discard block
 block discarded – undo
721 721
 	 */
722 722
 	public function exprUnlike(string $field, string $value, string $alias = '', bool $cs = true): string {
723 723
 		if ($this->getType() === DBALQueryBuilder::SELECT) {
724
-			$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field;
724
+			$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field;
725 725
 		}
726 726
 
727 727
 		$expr = $this->expr();
@@ -745,7 +745,7 @@  discard block
 block discarded – undo
745 745
 	 */
746 746
 	public function exprFilter(string $field, string $value, string $alias = '', bool $cs = true): string {
747 747
 		if ($this->getType() === DBALQueryBuilder::SELECT) {
748
-			$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field;
748
+			$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field;
749 749
 		}
750 750
 
751 751
 		$expr = $this->expr();
@@ -771,7 +771,7 @@  discard block
 block discarded – undo
771 771
 	 */
772 772
 	public function exprFilterInt(string $field, int $value, string $alias = ''): string {
773 773
 		if ($this->getType() === DBALQueryBuilder::SELECT) {
774
-			$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field;
774
+			$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field;
775 775
 		}
776 776
 
777 777
 		$expr = $this->expr();
@@ -789,7 +789,7 @@  discard block
 block discarded – undo
789 789
 	 */
790 790
 	public function exprFilterBool(string $field, bool $value, string $alias = ''): string {
791 791
 		if ($this->getType() === DBALQueryBuilder::SELECT) {
792
-			$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field;
792
+			$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field;
793 793
 		}
794 794
 
795 795
 		$expr = $this->expr();
@@ -810,7 +810,7 @@  discard block
 block discarded – undo
810 810
 		string $alias = ''
811 811
 	): ICompositeExpression {
812 812
 		if ($this->getType() === DBALQueryBuilder::SELECT) {
813
-			$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field;
813
+			$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field;
814 814
 		}
815 815
 
816 816
 		$expr = $this->expr();
@@ -836,7 +836,7 @@  discard block
 block discarded – undo
836 836
 		string $alias = ''
837 837
 	): ICompositeExpression {
838 838
 		if ($this->getType() === DBALQueryBuilder::SELECT) {
839
-			$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field;
839
+			$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field;
840 840
 		}
841 841
 
842 842
 		$expr = $this->expr();
@@ -865,7 +865,7 @@  discard block
 block discarded – undo
865 865
 		bool $cs = true
866 866
 	): ICompositeExpression {
867 867
 		if ($this->getType() === DBALQueryBuilder::SELECT) {
868
-			$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field;
868
+			$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field;
869 869
 		}
870 870
 
871 871
 		$orX = $this->expr()->orX();
@@ -890,7 +890,7 @@  discard block
 block discarded – undo
890 890
 	 */
891 891
 	public function exprFilterInArray(string $field, array $values, string $alias = ''): string {
892 892
 		if ($this->getType() === DBALQueryBuilder::SELECT) {
893
-			$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field;
893
+			$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field;
894 894
 		}
895 895
 
896 896
 		$expr = $this->expr();
@@ -908,7 +908,7 @@  discard block
 block discarded – undo
908 908
 	 */
909 909
 	public function exprFilterBitwise(string $field, int $flag, string $alias = ''): string {
910 910
 		if ($this->getType() === DBALQueryBuilder::SELECT) {
911
-			$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field;
911
+			$field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field;
912 912
 		}
913 913
 
914 914
 		$expr = $this->expr();
@@ -1069,12 +1069,12 @@  discard block
 block discarded – undo
1069 1069
 		string $alias = ''
1070 1070
 	): self {
1071 1071
 		$selectFields = array_map(
1072
-			function (string $item) use ($alias) {
1072
+			function(string $item) use ($alias) {
1073 1073
 				if ($alias === '') {
1074 1074
 					return $item;
1075 1075
 				}
1076 1076
 
1077
-				return $alias . '.' . $item;
1077
+				return $alias.'.'.$item;
1078 1078
 			}, $fields
1079 1079
 		);
1080 1080
 
@@ -1100,13 +1100,13 @@  discard block
 block discarded – undo
1100 1100
 		string $prefix,
1101 1101
 		array $default = []
1102 1102
 	): self {
1103
-		$prefix = trim($prefix) . '_';
1103
+		$prefix = trim($prefix).'_';
1104 1104
 		foreach ($default as $k => $v) {
1105
-			$this->addDefaultValue($prefix . $k, (string)$v);
1105
+			$this->addDefaultValue($prefix.$k, (string)$v);
1106 1106
 		}
1107 1107
 
1108 1108
 		foreach ($fields as $field) {
1109
-			$this->selectAlias($alias . '.' . $field, $prefix . $field);
1109
+			$this->selectAlias($alias.'.'.$field, $prefix.$field);
1110 1110
 		}
1111 1111
 
1112 1112
 		return $this;
Please login to merge, or discard this patch.