Completed
Push — master ( 17a9f5...0435b0 )
by John
26s queued 22s
created
lib/GlobalScale/MemberAdd.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
 			$this->sendMailExistingShares($template, $author, $recipient);
243 243
 			$this->sendPasswordExistingShares($author, $recipient, $password);
244 244
 		} catch (Exception $e) {
245
-			$this->miscService->log('Failed to send mail about existing share ' . $e->getMessage());
245
+			$this->miscService->log('Failed to send mail about existing share '.$e->getMessage());
246 246
 		}
247 247
 	}
248 248
 
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
 		$authorName = ($authorUser instanceof IUser) ? $authorUser->getDisplayName() : $author;
393 393
 		$authorEmail = ($authorUser instanceof IUser) ? $authorUser->getEMailAddress() : null;
394 394
 
395
-		$this->miscService->log("Sending password mail about existing files to '" . $email . "'", 0);
395
+		$this->miscService->log("Sending password mail about existing files to '".$email."'", 0);
396 396
 
397 397
 		$plainBodyPart = $this->l10n->t(
398 398
 			"%1\$s shared multiple files with you.\nYou should have already received a separate email with a link to access them.\n",
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
 		$message->setFrom([\OCP\Util::getDefaultEmailAddress($instanceName) => $senderName]);
435 435
 		if ($authorEmail !== null) {
436 436
 			$message->setReplyTo([$authorEmail => $authorName]);
437
-			$emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan());
437
+			$emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan());
438 438
 		} else {
439 439
 			$emailTemplate->addFooter();
440 440
 		}
Please login to merge, or discard this patch.
lib/Model/Member.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -811,29 +811,29 @@  discard block
 block discarded – undo
811 811
 	 * @throws MemberNotFoundException
812 812
 	 */
813 813
 	public function importFromDatabase(array $data, string $prefix = ''): INC22QueryRow {
814
-		if ($this->get($prefix . 'single_id', $data) === '') {
814
+		if ($this->get($prefix.'single_id', $data) === '') {
815 815
 			throw new MemberNotFoundException();
816 816
 		}
817 817
 
818
-		$this->setId($this->get($prefix . 'member_id', $data));
819
-		$this->setCircleId($this->get($prefix . 'circle_id', $data));
820
-		$this->setSingleId($this->get($prefix . 'single_id', $data));
821
-		$this->setUserId($this->get($prefix . 'user_id', $data));
822
-		$this->setUserType($this->getInt($prefix . 'user_type', $data));
823
-		$this->setInstance($this->get($prefix . 'instance', $data));
824
-		$this->setLevel($this->getInt($prefix . 'level', $data));
825
-		$this->setStatus($this->get($prefix . 'status', $data));
826
-		$this->setDisplayName($this->get($prefix . 'cached_name', $data));
827
-		$this->setNotes($this->getArray($prefix . 'note', $data));
828
-		$this->setContactId($this->get($prefix . 'contact_id', $data));
829
-		$this->setContactMeta($this->get($prefix . 'contact_meta', $data));
830
-
831
-		$cachedUpdate = $this->get($prefix . 'cached_update', $data);
818
+		$this->setId($this->get($prefix.'member_id', $data));
819
+		$this->setCircleId($this->get($prefix.'circle_id', $data));
820
+		$this->setSingleId($this->get($prefix.'single_id', $data));
821
+		$this->setUserId($this->get($prefix.'user_id', $data));
822
+		$this->setUserType($this->getInt($prefix.'user_type', $data));
823
+		$this->setInstance($this->get($prefix.'instance', $data));
824
+		$this->setLevel($this->getInt($prefix.'level', $data));
825
+		$this->setStatus($this->get($prefix.'status', $data));
826
+		$this->setDisplayName($this->get($prefix.'cached_name', $data));
827
+		$this->setNotes($this->getArray($prefix.'note', $data));
828
+		$this->setContactId($this->get($prefix.'contact_id', $data));
829
+		$this->setContactMeta($this->get($prefix.'contact_meta', $data));
830
+
831
+		$cachedUpdate = $this->get($prefix.'cached_update', $data);
832 832
 		if ($cachedUpdate !== '') {
833 833
 			$this->setDisplayUpdate(DateTime::createFromFormat('Y-m-d H:i:s', $cachedUpdate)->getTimestamp());
834 834
 		}
835 835
 
836
-		$joined = $this->get($prefix . 'joined', $data);
836
+		$joined = $this->get($prefix.'joined', $data);
837 837
 		if ($joined !== '') {
838 838
 			$this->setJoined(DateTime::createFromFormat('Y-m-d H:i:s', $joined)->getTimestamp());
839 839
 		}
@@ -924,7 +924,7 @@  discard block
 block discarded – undo
924 924
 	public static function parseLevelInt(int $level): int {
925 925
 		if (!array_key_exists($level, self::$DEF_LEVEL)) {
926 926
 			$all = implode(', ', array_keys(self::$DEF_LEVEL));
927
-			throw new ParseMemberLevelException('Available levels: ' . $all, 121);
927
+			throw new ParseMemberLevelException('Available levels: '.$all, 121);
928 928
 		}
929 929
 
930 930
 		return $level;
@@ -943,7 +943,7 @@  discard block
 block discarded – undo
943 943
 
944 944
 		if (!$level) {
945 945
 			$all = implode(', ', array_values(self::$DEF_LEVEL));
946
-			throw new ParseMemberLevelException('Available levels: ' . $all, 121);
946
+			throw new ParseMemberLevelException('Available levels: '.$all, 121);
947 947
 		}
948 948
 
949 949
 		return (int)$level;
@@ -964,7 +964,7 @@  discard block
 block discarded – undo
964 964
 		$type = array_search($typeString, Member::$TYPE);
965 965
 		if ($type === false) {
966 966
 			$all = implode(', ', array_values(self::$TYPE));
967
-			throw new UserTypeNotFoundException('Available types: ' . $all);
967
+			throw new UserTypeNotFoundException('Available types: '.$all);
968 968
 		}
969 969
 
970 970
 		return (int)$type;
Please login to merge, or discard this patch.
lib/Model/FederatedUser.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -400,15 +400,15 @@
 block discarded – undo
400 400
 	 * @throws FederatedUserNotFoundException
401 401
 	 */
402 402
 	public function importFromDatabase(array $data, string $prefix = ''): INC22QueryRow {
403
-		if ($this->get($prefix . 'single_id', $data) === '') {
403
+		if ($this->get($prefix.'single_id', $data) === '') {
404 404
 			throw new FederatedUserNotFoundException();
405 405
 		}
406 406
 
407
-		$this->setSingleId($this->get($prefix . 'single_id', $data));
408
-		$this->setUserId($this->get($prefix . 'user_id', $data));
409
-		$this->setUserType($this->getInt($prefix . 'user_type', $data));
410
-		$this->setDisplayName($this->get($prefix . 'cached_name', $data));
411
-		$this->setInstance($this->get($prefix . 'instance', $data));
407
+		$this->setSingleId($this->get($prefix.'single_id', $data));
408
+		$this->setUserId($this->get($prefix.'user_id', $data));
409
+		$this->setUserType($this->getInt($prefix.'user_type', $data));
410
+		$this->setDisplayName($this->get($prefix.'cached_name', $data));
411
+		$this->setInstance($this->get($prefix.'instance', $data));
412 412
 
413 413
 		$this->getManager()->manageImportFromDatabase($this, $data, $prefix);
414 414
 
Please login to merge, or discard this patch.
lib/Model/Federated/RemoteInstance.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -50,11 +50,11 @@  discard block
 block discarded – undo
50 50
 
51 51
 	use TArrayTools;
52 52
 
53
-	const TYPE_UNKNOWN = 'Unknown';    // not trusted
54
-	const TYPE_PASSIVE = 'Passive';    // Minimum information about Federated Circles are broadcasted if a member belongs to the circle.
55
-	const TYPE_EXTERNAL = 'External';  // info about Federated Circles and their members are broadcasted  if a member belongs to the circle.
56
-	const TYPE_TRUSTED = 'Trusted';    // everything about Federated Circles are broadcasted.
57
-	const TYPE_GLOBALSCALE = 'GlobalScale';  // every Circle is broadcasted,
53
+	const TYPE_UNKNOWN = 'Unknown'; // not trusted
54
+	const TYPE_PASSIVE = 'Passive'; // Minimum information about Federated Circles are broadcasted if a member belongs to the circle.
55
+	const TYPE_EXTERNAL = 'External'; // info about Federated Circles and their members are broadcasted  if a member belongs to the circle.
56
+	const TYPE_TRUSTED = 'Trusted'; // everything about Federated Circles are broadcasted.
57
+	const TYPE_GLOBALSCALE = 'GlobalScale'; // every Circle is broadcasted,
58 58
 
59 59
 	public static $LIST_TYPE = [
60 60
 		self::TYPE_UNKNOWN,
@@ -477,7 +477,7 @@  discard block
 block discarded – undo
477 477
 		];
478 478
 
479 479
 		if ($this->getAuthSigned() !== '') {
480
-			$data['auth-signed'] = $this->getAlgorithm() . ':' . $this->getAuthSigned();
480
+			$data['auth-signed'] = $this->getAlgorithm().':'.$this->getAuthSigned();
481 481
 		}
482 482
 
483 483
 		if (!empty($this->getAliases())) {
@@ -496,17 +496,17 @@  discard block
 block discarded – undo
496 496
 	 * @throws RemoteNotFoundException
497 497
 	 */
498 498
 	public function importFromDatabase(array $data, string $prefix = ''): INC22QueryRow {
499
-		if ($this->getInt($prefix . 'id', $data) === 0) {
499
+		if ($this->getInt($prefix.'id', $data) === 0) {
500 500
 			throw new RemoteNotFoundException();
501 501
 		}
502 502
 
503
-		$this->setDbId($this->getInt($prefix . 'id', $data));
504
-		$this->import($this->getArray($prefix . 'item', $data));
505
-		$this->setOrigData($this->getArray($prefix . 'item', $data));
506
-		$this->setType($this->get($prefix . 'type', $data));
507
-		$this->setInterface($this->getInt($prefix . 'interface', $data));
508
-		$this->setInstance($this->get($prefix . 'instance', $data));
509
-		$this->setId($this->get($prefix . 'href', $data));
503
+		$this->setDbId($this->getInt($prefix.'id', $data));
504
+		$this->import($this->getArray($prefix.'item', $data));
505
+		$this->setOrigData($this->getArray($prefix.'item', $data));
506
+		$this->setType($this->get($prefix.'type', $data));
507
+		$this->setInterface($this->getInt($prefix.'interface', $data));
508
+		$this->setInstance($this->get($prefix.'instance', $data));
509
+		$this->setId($this->get($prefix.'href', $data));
510 510
 
511 511
 		return $this;
512 512
 	}
Please login to merge, or discard this patch.
lib/Service/FederatedUserService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
 		if ($check) {
395 395
 			$user = $this->userManager->get($userId);
396 396
 			if ($user === null) {
397
-				throw new FederatedUserNotFoundException('user ' . $userId . ' not found');
397
+				throw new FederatedUserNotFoundException('user '.$userId.' not found');
398 398
 			}
399 399
 			$userId = $user->getUID();
400 400
 			$displayName = $user->getDisplayName();
@@ -852,7 +852,7 @@  discard block
 block discarded – undo
852 852
 			$prefix = ($federatedUser->getUserType() === Member::TYPE_APP) ? 'app'
853 853
 				: Member::$TYPE[$federatedUser->getUserType()];
854 854
 
855
-			$circle->setName($prefix . ':' . $federatedUser->getUserId() . ':' . $id)
855
+			$circle->setName($prefix.':'.$federatedUser->getUserId().':'.$id)
856 856
 				   ->setDisplayName($federatedUser->getDisplayName())
857 857
 				   ->setSingleId($id)
858 858
 				   ->setSource($source);
@@ -976,7 +976,7 @@  discard block
 block discarded – undo
976 976
 		$owner = $this->getCurrentApp();
977 977
 
978 978
 		$circle = new Circle();
979
-		$circle->setName('group:' . $groupId)
979
+		$circle->setName('group:'.$groupId)
980 980
 			   ->setConfig(Circle::CFG_SYSTEM | Circle::CFG_NO_OWNER | Circle::CFG_HIDDEN)
981 981
 			   ->setSingleId($this->token(ManagedModel::ID_LENGTH))
982 982
 			   ->setSource(Member::TYPE_GROUP);
Please login to merge, or discard this patch.
lib/FederatedItems/SingleMemberAdd.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -336,11 +336,11 @@  discard block
 block discarded – undo
336 336
 	protected function generateMember(FederatedEvent $event, Circle $circle, Member $member): Member {
337 337
 		try {
338 338
 			if ($member->getSingleId() !== '') {
339
-				$userId = $member->getSingleId() . '@' . $member->getInstance();
339
+				$userId = $member->getSingleId().'@'.$member->getInstance();
340 340
 				$federatedUser = $this->federatedUserService->getFederatedUser($userId, Member::TYPE_SINGLE);
341 341
 
342 342
 			} else {
343
-				$userId = $member->getUserId() . '@' . $member->getInstance();
343
+				$userId = $member->getUserId().'@'.$member->getInstance();
344 344
 				$federatedUser = $this->federatedUserService->getFederatedUser(
345 345
 					$userId,
346 346
 					$member->getUserType()
@@ -642,7 +642,7 @@  discard block
 block discarded – undo
642 642
 			$this->sendMailExistingShares($template, $author, $recipient);
643 643
 			$this->sendPasswordExistingShares($author, $recipient, $password);
644 644
 		} catch (Exception $e) {
645
-			$this->miscService->log('Failed to send mail about existing share ' . $e->getMessage());
645
+			$this->miscService->log('Failed to send mail about existing share '.$e->getMessage());
646 646
 		}
647 647
 	}
648 648
 
@@ -794,7 +794,7 @@  discard block
 block discarded – undo
794 794
 		$authorName = ($authorUser instanceof IUser) ? $authorUser->getDisplayName() : $author;
795 795
 		$authorEmail = ($authorUser instanceof IUser) ? $authorUser->getEMailAddress() : null;
796 796
 
797
-		$this->miscService->log("Sending password mail about existing files to '" . $email . "'", 0);
797
+		$this->miscService->log("Sending password mail about existing files to '".$email."'", 0);
798 798
 
799 799
 		$plainBodyPart = $this->l10n->t(
800 800
 			"%1\$s shared multiple files with you.\nYou should have already received a separate email with a link to access them.\n",
@@ -836,7 +836,7 @@  discard block
 block discarded – undo
836 836
 		$message->setFrom([\OCP\Util::getDefaultEmailAddress($instanceName) => $senderName]);
837 837
 		if ($authorEmail !== null) {
838 838
 			$message->setReplyTo([$authorEmail => $authorName]);
839
-			$emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan());
839
+			$emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan());
840 840
 		} else {
841 841
 			$emailTemplate->addFooter();
842 842
 		}
Please login to merge, or discard this patch.
lib/Service/CircleService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -496,7 +496,7 @@  discard block
 block discarded – undo
496 496
 
497 497
 		$i = 1;
498 498
 		while (true) {
499
-			$testDisplayName = $baseDisplayName . (($i > 1) ? ' (' . $i . ')' : '');
499
+			$testDisplayName = $baseDisplayName.(($i > 1) ? ' ('.$i.')' : '');
500 500
 			$test = new Circle();
501 501
 			$test->setDisplayName($testDisplayName);
502 502
 
@@ -529,7 +529,7 @@  discard block
 block discarded – undo
529 529
 
530 530
 		$i = 1;
531 531
 		while (true) {
532
-			$testSanitizedName = $baseSanitizedName . (($i > 1) ? ' (' . $i . ')' : '');
532
+			$testSanitizedName = $baseSanitizedName.(($i > 1) ? ' ('.$i.')' : '');
533 533
 
534 534
 			$test = new Circle();
535 535
 			$test->setSanitizedName($testSanitizedName);
Please login to merge, or discard this patch.
lib/Listeners/Examples/ExampleAddingCircleMember.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -89,12 +89,12 @@  discard block
 block discarded – undo
89 89
 
90 90
 		$eventType = ($event->getType() === CircleGenericEvent::INVITED) ? 'invited' : 'joined';
91 91
 
92
-		$info = 'A new member have been added (' . $eventType . ') to a Circle. ';
92
+		$info = 'A new member have been added ('.$eventType.') to a Circle. ';
93 93
 
94
-		$info .= 'userId: ' . $member->getUserId() . '; userType: ' . Member::$TYPE[$member->getUserType()]
95
-				 . '; singleId: ' . $member->getSingleId() . '; memberId: ' . $member->getId()
96
-				 . '; isLocal: ' . json_encode($member->isLocal()) . '; level: '
97
-				 . Member::$DEF_LEVEL[$member->getLevel()] . '; ';
94
+		$info .= 'userId: '.$member->getUserId().'; userType: '.Member::$TYPE[$member->getUserType()]
95
+				 . '; singleId: '.$member->getSingleId().'; memberId: '.$member->getId()
96
+				 . '; isLocal: '.json_encode($member->isLocal()).'; level: '
97
+				 . Member::$DEF_LEVEL[$member->getLevel()].'; ';
98 98
 
99 99
 		$memberships = array_map(
100 100
 			function(Membership $membership) {
@@ -103,22 +103,22 @@  discard block
 block discarded – undo
103 103
 		);
104 104
 
105 105
 		$listMemberships = (count($memberships) > 0) ? implode(', ', $memberships) : 'none';
106
-		$info .= 'circleName: ' . $circle->getDisplayName() . '; circleId: ' . $circle->getSingleId()
107
-				 . '; Circle memberships: ' . $listMemberships . '.';
106
+		$info .= 'circleName: '.$circle->getDisplayName().'; circleId: '.$circle->getSingleId()
107
+				 . '; Circle memberships: '.$listMemberships.'.';
108 108
 
109 109
 		if ($member->getUserType() === Member::TYPE_CIRCLE) {
110 110
 			$basedOn = $member->getBasedOn();
111 111
 			$members = array_map(
112 112
 				function(Member $member) {
113
-					return $member->getUserId() . ' (' . Member::$TYPE[$member->getUserType()] . ')';
113
+					return $member->getUserId().' ('.Member::$TYPE[$member->getUserType()].')';
114 114
 				}, $basedOn->getInheritedMembers()
115 115
 			);
116 116
 
117
-			$info .= ' Member is a Circle (singleId: ' . $basedOn->getSingleId()
118
-					 . ') that contains those inherited members: ' . implode(', ', $members);
117
+			$info .= ' Member is a Circle (singleId: '.$basedOn->getSingleId()
118
+					 . ') that contains those inherited members: '.implode(', ', $members);
119 119
 		}
120 120
 
121
-		$this->log(3, $prefix . $info);
121
+		$this->log(3, $prefix.$info);
122 122
 	}
123 123
 
124 124
 }
Please login to merge, or discard this patch.
lib/Listeners/Examples/ExampleRequestingCircleMember.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -91,11 +91,11 @@
 block discarded – undo
91 91
 
92 92
 		$circle = $event->getCircle();
93 93
 		$member = $event->getMember();
94
-		$info .= 'circleId: ' . $circle->getSingleId() . '; userId: ' . $member->getUserId() . '; userType: '
95
-				 . Member::$TYPE[$member->getUserType()] . '; singleId: ' . $member->getSingleId()
96
-				 . '; memberId: ' . $member->getId() . '; isLocal: ' . json_encode($member->isLocal()) . '; ';
94
+		$info .= 'circleId: '.$circle->getSingleId().'; userId: '.$member->getUserId().'; userType: '
95
+				 . Member::$TYPE[$member->getUserType()].'; singleId: '.$member->getSingleId()
96
+				 . '; memberId: '.$member->getId().'; isLocal: '.json_encode($member->isLocal()).'; ';
97 97
 
98
-		$this->log(3, $prefix . $info);
98
+		$this->log(3, $prefix.$info);
99 99
 	}
100 100
 
101 101
 }
Please login to merge, or discard this patch.