Completed
Push — master ( e4d651...7cc0a3 )
by Maxence
36s
created
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.