Completed
Pull Request — master (#551)
by Maxence
02:07
created
lib/Model/Federated/RemoteInstance.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -49,11 +49,11 @@  discard block
 block discarded – undo
49 49
 
50 50
 	use TArrayTools;
51 51
 
52
-	const TYPE_UNKNOWN = 'Unknown';    // not trusted
53
-	const TYPE_PASSIVE = 'Passive';    // Minimum information about Federated Circles are broadcasted if a member belongs to the circle.
54
-	const TYPE_EXTERNAL = 'External';  // info about Federated Circles and their members are broadcasted  if a member belongs to the circle.
55
-	const TYPE_TRUSTED = 'Trusted';    // everything about Federated Circles are broadcasted.
56
-	const TYPE_GLOBAL_SCALE = 'GlobalScale';  // every Circle is broadcasted,
52
+	const TYPE_UNKNOWN = 'Unknown'; // not trusted
53
+	const TYPE_PASSIVE = 'Passive'; // Minimum information about Federated Circles are broadcasted if a member belongs to the circle.
54
+	const TYPE_EXTERNAL = 'External'; // info about Federated Circles and their members are broadcasted  if a member belongs to the circle.
55
+	const TYPE_TRUSTED = 'Trusted'; // everything about Federated Circles are broadcasted.
56
+	const TYPE_GLOBAL_SCALE = 'GlobalScale'; // every Circle is broadcasted,
57 57
 
58 58
 	public static $LIST_TYPE = [
59 59
 		self::TYPE_UNKNOWN,
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
 		];
408 408
 
409 409
 		if ($this->getAuthSigned() !== '') {
410
-			$data['auth-signed'] = $this->getAlgorithm() . ':' . $this->getAuthSigned();
410
+			$data['auth-signed'] = $this->getAlgorithm().':'.$this->getAuthSigned();
411 411
 		}
412 412
 
413 413
 		return array_filter(array_merge($data, parent::jsonSerialize()));
Please login to merge, or discard this patch.
lib/Command/MembersList.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -158,11 +158,11 @@  discard block
 block discarded – undo
158 158
 		if ($input->getOption('tree')) {
159 159
 			$this->federatedUserService->commandLineInitiator($initiator, $circleId, true);
160 160
 			$circle = $this->circleService->getCircle($circleId);
161
-			$output->writeln('<info>Name</info>: ' . $circle->getName());
161
+			$output->writeln('<info>Name</info>: '.$circle->getName());
162 162
 			$owner = $circle->getOwner();
163
-			$output->writeln('<info>Owner</info>: ' . $owner->getUserId() . '@' . $owner->getInstance());
163
+			$output->writeln('<info>Owner</info>: '.$owner->getUserId().'@'.$owner->getInstance());
164 164
 			$type = implode(", ", Circle::getCircleTypes($circle, Circle::TYPES_LONG));
165
-			$output->writeln('<info>Config</info>: ' . $type);
165
+			$output->writeln('<info>Config</info>: '.$type);
166 166
 			$output->writeln(' ');
167 167
 
168 168
 			$tree = new NC21TreeNode(null, new SimpleDataStore(['circle' => $circle]));
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 		}
185 185
 
186 186
 		if ($input->getOption('json')) {
187
-			echo json_encode($members, JSON_PRETTY_PRINT) . "\n";
187
+			echo json_encode($members, JSON_PRETTY_PRINT)."\n";
188 188
 
189 189
 			return 0;
190 190
 		}
@@ -343,14 +343,14 @@  discard block
 block discarded – undo
343 343
 				$member = $data->gObj('member', Member::class);
344 344
 
345 345
 				if ($lineNumber === 1) {
346
-					$line .= '<info>' . $member->getUserId() . '</info>';
346
+					$line .= '<info>'.$member->getUserId().'</info>';
347 347
 					if (!$this->configService->isLocalInstance($member->getInstance())) {
348
-						$line .= '@' . $member->getInstance();
348
+						$line .= '@'.$member->getInstance();
349 349
 					}
350
-					$line .= ' (' . Member::$DEF_LEVEL[$member->getLevel()] . ')';
350
+					$line .= ' ('.Member::$DEF_LEVEL[$member->getLevel()].')';
351 351
 
352 352
 					if (!is_null($circle)) {
353
-						$line .= ' <info>Name</info>: ' . $circle->getName();
353
+						$line .= ' <info>Name</info>: '.$circle->getName();
354 354
 					}
355 355
 				}
356 356
 
@@ -363,16 +363,16 @@  discard block
 block discarded – undo
363 363
 						return $line;
364 364
 					}
365 365
 					$owner = $circle->getOwner();
366
-					$line .= '<info>Owner</info>: ' . $owner->getUserId() . '@' . $owner->getInstance();
366
+					$line .= '<info>Owner</info>: '.$owner->getUserId().'@'.$owner->getInstance();
367 367
 					$type = implode(", ", Circle::getCircleTypes($circle, Circle::TYPES_LONG));
368
-					$line .= ($type === '') ? '' : ' <info>Config</info>: ' . $type;
368
+					$line .= ($type === '') ? '' : ' <info>Config</info>: '.$type;
369 369
 				}
370 370
 
371 371
 			} else {
372 372
 				if ($lineNumber === 1 && !is_null($circle)) {
373
-					$line .= '<info>' . $circle->getId() . '</info>';
373
+					$line .= '<info>'.$circle->getId().'</info>';
374 374
 					if (!$this->configService->isLocalInstance($circle->getInstance())) {
375
-						$line .= '@' . $circle->getInstance();
375
+						$line .= '@'.$circle->getInstance();
376 376
 					}
377 377
 				}
378 378
 			}
Please login to merge, or discard this patch.
lib/Db/MemberRequest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -174,8 +174,8 @@
 block discarded – undo
174 174
 			$qb->limitToRemoteInstance($remoteInstance->getInstance(), true);
175 175
 		}
176 176
 
177
-		$qb->orderBy($qb->getDefaultSelectAlias() . '.level', 'desc');
178
-		$qb->addOrderBy($qb->getDefaultSelectAlias() . '.cached_name', 'asc');
177
+		$qb->orderBy($qb->getDefaultSelectAlias().'.level', 'desc');
178
+		$qb->addOrderBy($qb->getDefaultSelectAlias().'.cached_name', 'asc');
179 179
 
180 180
 		return $this->getItemsFromRequest($qb);
181 181
 	}
Please login to merge, or discard this patch.
lib/Model/Circle.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -82,23 +82,23 @@  discard block
 block discarded – undo
82 82
 
83 83
 
84 84
 	// specific value
85
-	const CFG_CIRCLE = 0;        // only for code readability. Circle is locked by default.
86
-	const CFG_SINGLE = 1;        // Circle with only one single member.
87
-	const CFG_PERSONAL = 2;      // Personal circle, only the owner can see it.
85
+	const CFG_CIRCLE = 0; // only for code readability. Circle is locked by default.
86
+	const CFG_SINGLE = 1; // Circle with only one single member.
87
+	const CFG_PERSONAL = 2; // Personal circle, only the owner can see it.
88 88
 
89 89
 	// bitwise
90
-	const CFG_SYSTEM = 4;         // System Circl (not managed by the official front-end). Meaning some config are limited
91
-	const CFG_VISIBLE = 8;        // Visible to everyone, if not visible, people have to know its name to be able to find it
92
-	const CFG_OPEN = 16;          // Circle is open, people can join
93
-	const CFG_INVITE = 32;        // Adding a member generate an invitation that needs to be accepted
94
-	const CFG_REQUEST = 64;       // Request to join Circles needs to be confirmed by a moderator
95
-	const CFG_FRIEND = 128;       // Members of the circle can invite their friends
96
-	const CFG_PROTECTED = 256;    // Password protected to join/request
97
-	const CFG_NO_OWNER = 512;     // no owner, only members
98
-	const CFG_HIDDEN = 1024;      // hidden from listing, but available as a share entity
99
-	const CFG_BACKEND = 2048;     // Fully hidden, only backend Circles
100
-	const CFG_ROOT = 4096;        // Circle cannot be inside another Circle
101
-	const CFG_FEDERATED = 8192;   // Federated
90
+	const CFG_SYSTEM = 4; // System Circl (not managed by the official front-end). Meaning some config are limited
91
+	const CFG_VISIBLE = 8; // Visible to everyone, if not visible, people have to know its name to be able to find it
92
+	const CFG_OPEN = 16; // Circle is open, people can join
93
+	const CFG_INVITE = 32; // Adding a member generate an invitation that needs to be accepted
94
+	const CFG_REQUEST = 64; // Request to join Circles needs to be confirmed by a moderator
95
+	const CFG_FRIEND = 128; // Members of the circle can invite their friends
96
+	const CFG_PROTECTED = 256; // Password protected to join/request
97
+	const CFG_NO_OWNER = 512; // no owner, only members
98
+	const CFG_HIDDEN = 1024; // hidden from listing, but available as a share entity
99
+	const CFG_BACKEND = 2048; // Fully hidden, only backend Circles
100
+	const CFG_ROOT = 4096; // Circle cannot be inside another Circle
101
+	const CFG_FEDERATED = 8192; // Federated
102 102
 
103 103
 
104 104
 	public static $DEF_CFG_MAX = 16383;
@@ -628,21 +628,21 @@  discard block
 block discarded – undo
628 628
 	 * @throws CircleNotFoundException
629 629
 	 */
630 630
 	public function importFromDatabase(array $data, string $prefix = ''): INC21QueryRow {
631
-		if (!array_key_exists($prefix . 'unique_id', $data)) {
631
+		if (!array_key_exists($prefix.'unique_id', $data)) {
632 632
 			throw new CircleNotFoundException();
633 633
 		}
634 634
 
635
-		$this->setId($this->get($prefix . 'unique_id', $data))
636
-			 ->setName($this->get($prefix . 'name', $data))
637
-			 ->setAltName($this->get($prefix . 'alt_name', $data))
638
-			 ->setConfig($this->getInt($prefix . 'config', $data))
639
-			 ->setInstance($this->get($prefix . 'instance', $data))
640
-			 ->setSettings($this->getArray($prefix . 'settings', $data))
641
-			 ->setContactAddressBook($this->getInt($prefix . 'contact_addressbook', $data))
642
-			 ->setContactGroupName($this->get($prefix . 'contact_groupname', $data))
643
-			 ->setDescription($this->get($prefix . 'description', $data));
644
-
645
-		$creation = $this->get($prefix . 'creation', $data);
635
+		$this->setId($this->get($prefix.'unique_id', $data))
636
+			 ->setName($this->get($prefix.'name', $data))
637
+			 ->setAltName($this->get($prefix.'alt_name', $data))
638
+			 ->setConfig($this->getInt($prefix.'config', $data))
639
+			 ->setInstance($this->get($prefix.'instance', $data))
640
+			 ->setSettings($this->getArray($prefix.'settings', $data))
641
+			 ->setContactAddressBook($this->getInt($prefix.'contact_addressbook', $data))
642
+			 ->setContactGroupName($this->get($prefix.'contact_groupname', $data))
643
+			 ->setDescription($this->get($prefix.'description', $data));
644
+
645
+		$creation = $this->get($prefix.'creation', $data);
646 646
 		$this->setCreation(DateTime::createFromFormat('Y-m-d H:i:s', $creation)->getTimestamp());
647 647
 
648 648
 		$this->getManager()->importOwnerFromDatabase($this, $data);
Please login to merge, or discard this patch.
lib/Command/CirclesConfig.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -182,8 +182,8 @@
 block discarded – undo
182 182
 			$value = array_search(strtoupper($item), $valid);
183 183
 			if (!$value) {
184 184
 				throw new InvalidArgumentException(
185
-					'Invalid config \'' . $item . '\'. Available values: '
186
-					. implode(', ', array_values($valid)) . '. '
185
+					'Invalid config \''.$item.'\'. Available values: '
186
+					. implode(', ', array_values($valid)).'. '
187 187
 					. 'To disable a config, start the value with an underscore'
188 188
 				);
189 189
 			}
Please login to merge, or discard this patch.
lib/FederatedItems/MemberAdd.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -164,15 +164,15 @@  discard block
 block discarded – undo
164 164
 		$initiatorHelper = new MemberHelper($initiator);
165 165
 		$initiatorHelper->mustBeModerator();
166 166
 
167
-		$federatedId = $member->getUserId() . '@' . $member->getInstance();
167
+		$federatedId = $member->getUserId().'@'.$member->getInstance();
168 168
 
169 169
 		try {
170 170
 			$federatedUser =
171 171
 				$this->federatedUserService->getFederatedUser($federatedId, $member->getUserType());
172 172
 		} catch (MemberNotFoundException $e) {
173 173
 			throw new MemberNotFoundException(
174
-				ucfirst(Member::$DEF_TYPE[$member->getUserType()]) . ' %s not found',
175
-				['member' => $member->getUserId() . '@' . $member->getInstance()]
174
+				ucfirst(Member::$DEF_TYPE[$member->getUserType()]).' %s not found',
175
+				['member' => $member->getUserId().'@'.$member->getInstance()]
176 176
 			);
177 177
 		}
178 178
 
@@ -182,8 +182,8 @@  discard block
 block discarded – undo
182 182
 			$knownMember = $this->memberRequest->searchMember($member);
183 183
 			// TODO: maybe member is requesting access
184 184
 			throw new MemberAlreadyExistsException(
185
-				ucfirst(Member::$DEF_TYPE[$member->getUserType()]) . ' %s is already a member',
186
-				['member' => $member->getUserId() . '@' . $member->getInstance()]
185
+				ucfirst(Member::$DEF_TYPE[$member->getUserType()]).' %s is already a member',
186
+				['member' => $member->getUserId().'@'.$member->getInstance()]
187 187
 			);
188 188
 		} catch (MemberNotFoundException $e) {
189 189
 		}
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
 
202 202
 		// TODO: check if it is a member or a mail or a circle and fix the returned message
203 203
 		$event->setReadingOutcome(
204
-			ucfirst(Member::$DEF_TYPE[$member->getUserType()]) . ' ' . '\'%s\' have been added to Circle',
204
+			ucfirst(Member::$DEF_TYPE[$member->getUserType()]).' '.'\'%s\' have been added to Circle',
205 205
 			['userId' => $member->getUserId()]
206 206
 		);
207 207
 
@@ -501,7 +501,7 @@  discard block
 block discarded – undo
501 501
 			$this->sendMailExistingShares($template, $author, $recipient);
502 502
 			$this->sendPasswordExistingShares($author, $recipient, $password);
503 503
 		} catch (Exception $e) {
504
-			$this->miscService->log('Failed to send mail about existing share ' . $e->getMessage());
504
+			$this->miscService->log('Failed to send mail about existing share '.$e->getMessage());
505 505
 		}
506 506
 	}
507 507
 
@@ -653,7 +653,7 @@  discard block
 block discarded – undo
653 653
 		$authorName = ($authorUser instanceof IUser) ? $authorUser->getDisplayName() : $author;
654 654
 		$authorEmail = ($authorUser instanceof IUser) ? $authorUser->getEMailAddress() : null;
655 655
 
656
-		$this->miscService->log("Sending password mail about existing files to '" . $email . "'", 0);
656
+		$this->miscService->log("Sending password mail about existing files to '".$email."'", 0);
657 657
 
658 658
 		$plainBodyPart = $this->l10n->t(
659 659
 			"%1\$s shared multiple files with you.\nYou should have already received a separate mail with a link to access them.\n",
@@ -695,7 +695,7 @@  discard block
 block discarded – undo
695 695
 		$message->setFrom([\OCP\Util::getDefaultEmailAddress($instanceName) => $senderName]);
696 696
 		if ($authorEmail !== null) {
697 697
 			$message->setReplyTo([$authorEmail => $authorName]);
698
-			$emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan());
698
+			$emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan());
699 699
 		} else {
700 700
 			$emailTemplate->addFooter();
701 701
 		}
Please login to merge, or discard this patch.
lib/Service/ConfigService.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
 		if ((!$this->isNonSSLLinksAllowed() || strpos($remote, 'http://') !== 0)
255 255
 			&& strpos($remote, 'https://') !== 0
256 256
 		) {
257
-			$remote = 'https://' . $remote;
257
+			$remote = 'https://'.$remote;
258 258
 		}
259 259
 
260 260
 		return rtrim($remote, '/');
@@ -524,7 +524,7 @@  discard block
 block discarded – undo
524 524
 
525 525
 			if ($type !== self::GS_MOCKUP) {
526 526
 				throw new GSStatusException(
527
-					'GS and lookup are not configured : ' . $lookup . ', ' . $enabled
527
+					'GS and lookup are not configured : '.$lookup.', '.$enabled
528 528
 				);
529 529
 			}
530 530
 		}
@@ -593,7 +593,7 @@  discard block
 block discarded – undo
593 593
 			}
594 594
 
595 595
 			if (array_key_exists('port', $local)) {
596
-				return $local['host'] . ':' . $local['port'];
596
+				return $local['host'].':'.$local['port'];
597 597
 			} else {
598 598
 				return $local['host'];
599 599
 			}
@@ -615,13 +615,13 @@  discard block
 block discarded – undo
615 615
 	 * @return string
616 616
 	 */
617 617
 	public function getRemotePath(string $route = 'circles.Remote.appService', array $args = []): string {
618
-		$base = $this->getAppValue(self::LOCAL_CLOUD_SCHEME) . '://' . $this->getLocalInstance();
618
+		$base = $this->getAppValue(self::LOCAL_CLOUD_SCHEME).'://'.$this->getLocalInstance();
619 619
 
620 620
 		if ($route === '') {
621 621
 			return $base;
622 622
 		}
623 623
 
624
-		return $base . $this->urlGenerator->linkToRoute($route, $args);
624
+		return $base.$this->urlGenerator->linkToRoute($route, $args);
625 625
 	}
626 626
 
627 627
 	/**
@@ -724,7 +724,7 @@  discard block
 block discarded – undo
724 724
 			$ncBase = substr($ncBase, 0, -strlen($forcedPath));
725 725
 		}
726 726
 
727
-		return rtrim($ncBase, '/') . $link;
727
+		return rtrim($ncBase, '/').$link;
728 728
 	}
729 729
 
730 730
 }
Please login to merge, or discard this patch.
lib/Db/FileSharesRequest.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
 		$expr = $qb->expr();
106 106
 
107 107
 		$this->limitToShareType($qb, self::SHARE_TYPE);
108
-		$qb->andWhere($expr->isNull($this->default_select_alias . '.parent'));
108
+		$qb->andWhere($expr->isNull($this->default_select_alias.'.parent'));
109 109
 
110 110
 		$shares = [];
111 111
 		$cursor = $qb->execute();
Please login to merge, or discard this patch.
lib/Db/CoreRequestBuilder.php 1 patch
Spacing   +66 added lines, -66 removed lines patch added patch discarded remove patch
@@ -164,16 +164,16 @@  discard block
 block discarded – undo
164 164
 		$this->generateMemberSelectAlias($alias, self::PREFIX_MEMBER)
165 165
 			 ->leftJoin(
166 166
 				 $this->getDefaultSelectAlias(), CoreQueryBuilder::TABLE_MEMBER, $alias,
167
-				 $expr->eq($alias . '.circle_id', $this->getDefaultSelectAlias() . '.unique_id')
167
+				 $expr->eq($alias.'.circle_id', $this->getDefaultSelectAlias().'.unique_id')
168 168
 			 );
169 169
 
170 170
 		// TODO: Check in big table if it is better to put condition in andWhere() or in LeftJoin()
171 171
 		$this->andWhere(
172 172
 			$expr->andX(
173
-				$expr->eq($alias . '.user_id', $this->createNamedParameter($member->getUserId())),
174
-				$expr->eq($alias . '.user_type', $this->createNamedParameter($member->getUserType())),
175
-				$expr->eq($alias . '.instance', $this->createNamedParameter($this->getInstance($member))),
176
-				$expr->gte($alias . '.level', $this->createNamedParameter($level))
173
+				$expr->eq($alias.'.user_id', $this->createNamedParameter($member->getUserId())),
174
+				$expr->eq($alias.'.user_type', $this->createNamedParameter($member->getUserType())),
175
+				$expr->eq($alias.'.instance', $this->createNamedParameter($this->getInstance($member))),
176
+				$expr->gte($alias.'.level', $this->createNamedParameter($level))
177 177
 			)
178 178
 		);
179 179
 	}
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 			 ->leftJoin(
195 195
 				 $this->getDefaultSelectAlias(), CoreQueryBuilder::TABLE_CIRCLE, $alias,
196 196
 				 $expr->andX(
197
-					 $expr->eq($alias . '.unique_id', $this->getDefaultSelectAlias() . '.circle_id')
197
+					 $expr->eq($alias.'.unique_id', $this->getDefaultSelectAlias().'.circle_id')
198 198
 				 )
199 199
 			 );
200 200
 
@@ -224,8 +224,8 @@  discard block
 block discarded – undo
224 224
 			 ->leftJoin(
225 225
 				 $circleTableAlias, CoreQueryBuilder::TABLE_MEMBER, $alias,
226 226
 				 $expr->andX(
227
-					 $expr->eq($alias . '.circle_id', $circleTableAlias . '.unique_id'),
228
-					 $expr->eq($alias . '.level', $this->createNamedParameter(Member::LEVEL_OWNER))
227
+					 $expr->eq($alias.'.circle_id', $circleTableAlias.'.unique_id'),
228
+					 $expr->eq($alias.'.level', $this->createNamedParameter(Member::LEVEL_OWNER))
229 229
 				 )
230 230
 			 );
231 231
 	}
@@ -251,11 +251,11 @@  discard block
 block discarded – undo
251 251
 			 ->leftJoin(
252 252
 				 $aliasCircle, CoreQueryBuilder::TABLE_MEMBER, $alias,
253 253
 				 $expr->andX(
254
-					 $expr->eq($alias . '.circle_id', $aliasCircle . '.unique_id'),
255
-					 $expr->eq($alias . '.user_id', $this->createNamedParameter($initiator->getUserId())),
256
-					 $expr->eq($alias . '.user_type', $this->createNamedParameter($initiator->getUserType())),
254
+					 $expr->eq($alias.'.circle_id', $aliasCircle.'.unique_id'),
255
+					 $expr->eq($alias.'.user_id', $this->createNamedParameter($initiator->getUserId())),
256
+					 $expr->eq($alias.'.user_type', $this->createNamedParameter($initiator->getUserType())),
257 257
 					 $expr->eq(
258
-						 $alias . '.instance', $this->createNamedParameter($this->getInstance($initiator))
258
+						 $alias.'.instance', $this->createNamedParameter($this->getInstance($initiator))
259 259
 					 )
260 260
 				 )
261 261
 			 );
@@ -281,9 +281,9 @@  discard block
 block discarded – undo
281 281
 		$this->leftJoin(
282 282
 			$this->getDefaultSelectAlias(), CoreQueryBuilder::TABLE_MEMBER, $alias,
283 283
 			$expr->andX(
284
-				$expr->eq($alias . '.circle_id', $aliasCircle . '.unique_id'),
285
-				$expr->eq($alias . '.instance', $this->createNamedParameter($instance)),
286
-				$expr->gte($alias . '.level', $this->createNamedParameter(Member::LEVEL_MEMBER))
284
+				$expr->eq($alias.'.circle_id', $aliasCircle.'.unique_id'),
285
+				$expr->eq($alias.'.instance', $this->createNamedParameter($instance)),
286
+				$expr->gte($alias.'.level', $this->createNamedParameter(Member::LEVEL_MEMBER))
287 287
 			)
288 288
 		);
289 289
 	}
@@ -308,17 +308,17 @@  discard block
 block discarded – undo
308 308
 		$this->leftJoin(
309 309
 			$this->getDefaultSelectAlias(), CoreQueryBuilder::TABLE_MEMBER, $alias,
310 310
 			$expr->andX(
311
-				$expr->eq($alias . '.single_id', $aliasCircle . '.unique_id'),
312
-				$expr->emptyString($alias . '.instance'),
313
-				$expr->gte($alias . '.level', $this->createNamedParameter(Member::LEVEL_MEMBER))
311
+				$expr->eq($alias.'.single_id', $aliasCircle.'.unique_id'),
312
+				$expr->emptyString($alias.'.instance'),
313
+				$expr->gte($alias.'.level', $this->createNamedParameter(Member::LEVEL_MEMBER))
314 314
 			)
315 315
 		);
316 316
 		$this->leftJoin(
317 317
 			$this->getDefaultSelectAlias(), CoreQueryBuilder::TABLE_MEMBER, $aliasRemoteOwner,
318 318
 			$expr->andX(
319
-				$expr->eq($alias . '.circle_id', $aliasRemoteOwner . '.circle_id'),
320
-				$expr->eq($aliasRemoteOwner . '.instance', $this->createNamedParameter($instance)),
321
-				$expr->eq($aliasRemoteOwner . '.level', $this->createNamedParameter(Member::LEVEL_OWNER))
319
+				$expr->eq($alias.'.circle_id', $aliasRemoteOwner.'.circle_id'),
320
+				$expr->eq($aliasRemoteOwner.'.instance', $this->createNamedParameter($instance)),
321
+				$expr->eq($aliasRemoteOwner.'.level', $this->createNamedParameter(Member::LEVEL_OWNER))
322 322
 			)
323 323
 		);
324 324
 	}
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
 		$expr = $this->expr();
339 339
 		$this->leftJoin(
340 340
 			$this->getDefaultSelectAlias(), CoreQueryBuilder::TABLE_REMOTE, $alias,
341
-			$expr->eq($alias . '.instance', $this->createNamedParameter($instance))
341
+			$expr->eq($alias.'.instance', $this->createNamedParameter($instance))
342 342
 		);
343 343
 	}
344 344
 
@@ -357,15 +357,15 @@  discard block
 block discarded – undo
357 357
 		// - 4 (Visible to everyone)
358 358
 		$orX = $expr->orX();
359 359
 		$orX->add(
360
-			$expr->andX($expr->gte($alias . '.level', $this->createNamedParameter(Member::LEVEL_MEMBER)))
360
+			$expr->andX($expr->gte($alias.'.level', $this->createNamedParameter(Member::LEVEL_MEMBER)))
361 361
 		);
362 362
 		$orX->add(
363 363
 			$expr->andX(
364
-				$expr->bitwiseAnd($aliasCircle . '.config', Circle::CFG_PERSONAL),
365
-				$expr->eq($alias . '.level', $this->createNamedParameter(Member::LEVEL_OWNER))
364
+				$expr->bitwiseAnd($aliasCircle.'.config', Circle::CFG_PERSONAL),
365
+				$expr->eq($alias.'.level', $this->createNamedParameter(Member::LEVEL_OWNER))
366 366
 			)
367 367
 		);
368
-		$orX->add($expr->bitwiseAnd($aliasCircle . '.config', Circle::CFG_VISIBLE));
368
+		$orX->add($expr->bitwiseAnd($aliasCircle.'.config', Circle::CFG_VISIBLE));
369 369
 		$this->andWhere($orX);
370 370
 
371 371
 
@@ -400,10 +400,10 @@  discard block
 block discarded – undo
400 400
 		$expr = $this->expr();
401 401
 
402 402
 		$orHidden = $expr->orX();
403
-		$orHidden->add($expr->bitwiseAnd($alias . '.config', Circle::CFG_SINGLE));
404
-		$orHidden->add($expr->bitwiseAnd($alias . '.config', Circle::CFG_HIDDEN));
405
-		$orHidden->add($expr->bitwiseAnd($alias . '.config', Circle::CFG_BACKEND));
406
-		$this->andWhere($this->createFunction('NOT') . $orHidden);
403
+		$orHidden->add($expr->bitwiseAnd($alias.'.config', Circle::CFG_SINGLE));
404
+		$orHidden->add($expr->bitwiseAnd($alias.'.config', Circle::CFG_HIDDEN));
405
+		$orHidden->add($expr->bitwiseAnd($alias.'.config', Circle::CFG_BACKEND));
406
+		$this->andWhere($this->createFunction('NOT').$orHidden);
407 407
 	}
408 408
 
409 409
 
@@ -436,16 +436,16 @@  discard block
 block discarded – undo
436 436
 
437 437
 		$orX = $expr->orX();
438 438
 		$orX->add(
439
-			$expr->eq($alias . '.type', $this->createNamedParameter(RemoteInstance::TYPE_GLOBAL_SCALE))
439
+			$expr->eq($alias.'.type', $this->createNamedParameter(RemoteInstance::TYPE_GLOBAL_SCALE))
440 440
 		);
441 441
 
442 442
 		$orExtOrPassive = $expr->orX();
443 443
 		$orExtOrPassive->add(
444
-			$expr->eq($alias . '.type', $this->createNamedParameter(RemoteInstance::TYPE_EXTERNAL))
444
+			$expr->eq($alias.'.type', $this->createNamedParameter(RemoteInstance::TYPE_EXTERNAL))
445 445
 		);
446 446
 		if (!$sensitive) {
447 447
 			$orExtOrPassive->add(
448
-				$expr->eq($alias . '.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE))
448
+				$expr->eq($alias.'.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE))
449 449
 			);
450 450
 		} else {
451 451
 			if ($this->getDefaultSelectAlias() === 'm') {
@@ -455,8 +455,8 @@  discard block
 block discarded – undo
455 455
 
456 456
 
457 457
 		$orInstance = $expr->orX();
458
-		$orInstance->add($expr->isNotNull($aliasMembers . '.instance'));
459
-		$orInstance->add($expr->isNotNull($aliasRemoteOwner . '.instance'));
458
+		$orInstance->add($expr->isNotNull($aliasMembers.'.instance'));
459
+		$orInstance->add($expr->isNotNull($aliasRemoteOwner.'.instance'));
460 460
 
461 461
 		$andExternal = $expr->andX();
462 462
 		$andExternal->add($orExtOrPassive);
@@ -465,13 +465,13 @@  discard block
 block discarded – undo
465 465
 		$orExtOrTrusted = $expr->orX();
466 466
 		$orExtOrTrusted->add($andExternal);
467 467
 		$orExtOrTrusted->add(
468
-			$expr->eq($alias . '.type', $this->createNamedParameter(RemoteInstance::TYPE_TRUSTED))
468
+			$expr->eq($alias.'.type', $this->createNamedParameter(RemoteInstance::TYPE_TRUSTED))
469 469
 		);
470 470
 
471 471
 		$andTrusted = $expr->andX();
472 472
 		$andTrusted->add($orExtOrTrusted);
473
-		$andTrusted->add($expr->bitwiseAnd($aliasCircle . '.config', Circle::CFG_FEDERATED));
474
-		$andTrusted->add($expr->emptyString($aliasOwner . '.instance'));
473
+		$andTrusted->add($expr->bitwiseAnd($aliasCircle.'.config', Circle::CFG_FEDERATED));
474
+		$andTrusted->add($expr->emptyString($aliasOwner.'.instance'));
475 475
 		$orX->add($andTrusted);
476 476
 
477 477
 		$this->andWhere($orX);
@@ -489,21 +489,21 @@  discard block
 block discarded – undo
489 489
 		$expr = $this->expr();
490 490
 		$andPassive = $expr->andX();
491 491
 		$andPassive->add(
492
-			$expr->eq($alias . '.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE))
492
+			$expr->eq($alias.'.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE))
493 493
 		);
494 494
 
495 495
 		$orMemberOrLevel = $expr->orX();
496 496
 		$orMemberOrLevel->add(
497
-			$expr->eq($this->getDefaultSelectAlias() . '.instance', $alias . '.instance')
497
+			$expr->eq($this->getDefaultSelectAlias().'.instance', $alias.'.instance')
498 498
 		);
499 499
 		// TODO: do we need this ? (display members from the local instance)
500 500
 		$orMemberOrLevel->add(
501
-			$expr->emptyString($this->getDefaultSelectAlias() . '.instance')
501
+			$expr->emptyString($this->getDefaultSelectAlias().'.instance')
502 502
 		);
503 503
 
504 504
 		$orMemberOrLevel->add(
505 505
 			$expr->eq(
506
-				$this->getDefaultSelectAlias() . '.level',
506
+				$this->getDefaultSelectAlias().'.level',
507 507
 				$this->createNamedParameter(Member::LEVEL_OWNER)
508 508
 			)
509 509
 		);
@@ -517,7 +517,7 @@  discard block
 block discarded – undo
517 517
 	 * @param int $flag
518 518
 	 */
519 519
 	public function filterConfig(int $flag): void {
520
-		$this->andWhere($this->expr()->bitwiseAnd($this->getDefaultSelectAlias() . '.config', $flag));
520
+		$this->andWhere($this->expr()->bitwiseAnd($this->getDefaultSelectAlias().'.config', $flag));
521 521
 	}
522 522
 
523 523
 
@@ -528,15 +528,15 @@  discard block
 block discarded – undo
528 528
 	 * @return $this
529 529
 	 */
530 530
 	private function generateCircleSelectAlias(string $alias, string $prefix): self {
531
-		$this->selectAlias($alias . '.unique_id', $prefix . 'unique_id')
532
-			 ->selectAlias($alias . '.name', $prefix . 'name')
533
-			 ->selectAlias($alias . '.alt_name', $prefix . 'alt_name')
534
-			 ->selectAlias($alias . '.description', $prefix . 'description')
535
-			 ->selectAlias($alias . '.settings', $prefix . 'settings')
536
-			 ->selectAlias($alias . '.config', $prefix . 'config')
537
-			 ->selectAlias($alias . '.contact_addressbook', $prefix . 'contact_addressbook')
538
-			 ->selectAlias($alias . '.contact_groupname', $prefix . 'contact_groupname')
539
-			 ->selectAlias($alias . '.creation', $prefix . 'creation');
531
+		$this->selectAlias($alias.'.unique_id', $prefix.'unique_id')
532
+			 ->selectAlias($alias.'.name', $prefix.'name')
533
+			 ->selectAlias($alias.'.alt_name', $prefix.'alt_name')
534
+			 ->selectAlias($alias.'.description', $prefix.'description')
535
+			 ->selectAlias($alias.'.settings', $prefix.'settings')
536
+			 ->selectAlias($alias.'.config', $prefix.'config')
537
+			 ->selectAlias($alias.'.contact_addressbook', $prefix.'contact_addressbook')
538
+			 ->selectAlias($alias.'.contact_groupname', $prefix.'contact_groupname')
539
+			 ->selectAlias($alias.'.creation', $prefix.'creation');
540 540
 
541 541
 		return $this;
542 542
 	}
@@ -548,20 +548,20 @@  discard block
 block discarded – undo
548 548
 	 * @return $this
549 549
 	 */
550 550
 	private function generateMemberSelectAlias(string $alias, string $prefix): self {
551
-		$this->selectAlias($alias . '.circle_id', $prefix . 'circle_id')
552
-			 ->selectAlias($alias . '.single_id', $prefix . 'single_id')
553
-			 ->selectAlias($alias . '.user_id', $prefix . 'user_id')
554
-			 ->selectAlias($alias . '.user_type', $prefix . 'user_type')
555
-			 ->selectAlias($alias . '.member_id', $prefix . 'member_id')
556
-			 ->selectAlias($alias . '.instance', $prefix . 'instance')
557
-			 ->selectAlias($alias . '.cached_name', $prefix . 'cached_name')
558
-			 ->selectAlias($alias . '.cached_update', $prefix . 'cached_update')
559
-			 ->selectAlias($alias . '.status', $prefix . 'status')
560
-			 ->selectAlias($alias . '.level', $prefix . 'level')
561
-			 ->selectAlias($alias . '.note', $prefix . 'note')
562
-			 ->selectAlias($alias . '.contact_id', $prefix . 'contact_id')
563
-			 ->selectAlias($alias . '.contact_meta', $prefix . 'contact_meta')
564
-			 ->selectAlias($alias . '.joined', $prefix . 'joined');
551
+		$this->selectAlias($alias.'.circle_id', $prefix.'circle_id')
552
+			 ->selectAlias($alias.'.single_id', $prefix.'single_id')
553
+			 ->selectAlias($alias.'.user_id', $prefix.'user_id')
554
+			 ->selectAlias($alias.'.user_type', $prefix.'user_type')
555
+			 ->selectAlias($alias.'.member_id', $prefix.'member_id')
556
+			 ->selectAlias($alias.'.instance', $prefix.'instance')
557
+			 ->selectAlias($alias.'.cached_name', $prefix.'cached_name')
558
+			 ->selectAlias($alias.'.cached_update', $prefix.'cached_update')
559
+			 ->selectAlias($alias.'.status', $prefix.'status')
560
+			 ->selectAlias($alias.'.level', $prefix.'level')
561
+			 ->selectAlias($alias.'.note', $prefix.'note')
562
+			 ->selectAlias($alias.'.contact_id', $prefix.'contact_id')
563
+			 ->selectAlias($alias.'.contact_meta', $prefix.'contact_meta')
564
+			 ->selectAlias($alias.'.joined', $prefix.'joined');
565 565
 
566 566
 		return $this;
567 567
 	}
Please login to merge, or discard this patch.