Completed
Push — master ( 53bc03...210216 )
by Maxence
06:34 queued 04:11
created
lib/Command/MembersList.php 1 patch
Spacing   +14 added lines, -15 removed lines patch added patch discarded remove patch
@@ -186,11 +186,11 @@  discard block
 block discarded – undo
186 186
 			$this->federatedUserService->commandLineInitiator($initiator, $initiatorType, $circleId, true);
187 187
 			$circle = $this->circleService->getCircle($circleId);
188 188
 
189
-			$output->writeln('<info>Name</info>: ' . $circle->getName());
189
+			$output->writeln('<info>Name</info>: '.$circle->getName());
190 190
 			$owner = $circle->getOwner();
191
-			$output->writeln('<info>Owner</info>: ' . $owner->getUserId() . '@' . $owner->getInstance());
191
+			$output->writeln('<info>Owner</info>: '.$owner->getUserId().'@'.$owner->getInstance());
192 192
 			$type = implode(", ", Circle::getCircleFlags($circle, Circle::FLAGS_LONG));
193
-			$output->writeln('<info>Config</info>: ' . $type);
193
+			$output->writeln('<info>Config</info>: '.$type);
194 194
 			$output->writeln(' ');
195 195
 
196 196
 			$tree = new NC22TreeNode(null, new SimpleDataStore(['circle' => $circle]));
@@ -254,8 +254,7 @@  discard block
 block discarded – undo
254 254
 					($this->input->getOption('display-name')) ?
255 255
 						$member->getBasedOn()->getDisplayName() : $member->getUserId(),
256 256
 					$this->configService->displayInstance($member->getInstance()),
257
-					($level > 0) ? Member::$DEF_LEVEL[$level] :
258
-						'(' . strtolower($member->getStatus()) . ')'
257
+					($level > 0) ? Member::$DEF_LEVEL[$level] : '('.strtolower($member->getStatus()).')'
259 258
 				]
260 259
 			);
261 260
 		}
@@ -414,18 +413,18 @@  discard block
 block discarded – undo
414 413
 				$member = $data->gObj('member', Member::class);
415 414
 
416 415
 				if ($lineNumber === 1) {
417
-					$line .= '<info>' . $member->getSingleId() . '</info>';
416
+					$line .= '<info>'.$member->getSingleId().'</info>';
418 417
 					if (!$this->configService->isLocalInstance($member->getInstance())) {
419
-						$line .= '@' . $member->getInstance();
418
+						$line .= '@'.$member->getInstance();
420 419
 					}
421
-					$line .= ' (' . Member::$DEF_LEVEL[$member->getLevel()] . ')';
420
+					$line .= ' ('.Member::$DEF_LEVEL[$member->getLevel()].')';
422 421
 
423
-					$line .= ' <info>MemberId</info>: ' . $member->getId();
422
+					$line .= ' <info>MemberId</info>: '.$member->getId();
424 423
 					$name = ($this->input->getOption('display-name')) ?
425 424
 						$member->getBasedOn()->getDisplayName() : $member->getUserId();
426
-					$line .= ' <info>Name</info>: ' . $name;
425
+					$line .= ' <info>Name</info>: '.$name;
427 426
 					$source = ($member->hasBasedOn()) ? $member->getBasedOn()->getSource() : '';
428
-					$line .= ' <info>Source</info>: ' . Circle::$DEF_SOURCE[$source];
427
+					$line .= ' <info>Source</info>: '.Circle::$DEF_SOURCE[$source];
429 428
 				}
430 429
 
431 430
 				if ($lineNumber === 2) {
@@ -437,16 +436,16 @@  discard block
 block discarded – undo
437 436
 						return $line;
438 437
 					}
439 438
 					$owner = $circle->getOwner();
440
-					$line .= '<info>Owner</info>: ' . $owner->getUserId() . '@' . $owner->getInstance();
439
+					$line .= '<info>Owner</info>: '.$owner->getUserId().'@'.$owner->getInstance();
441 440
 					$type = implode(", ", Circle::getCircleFlags($circle, Circle::FLAGS_LONG));
442
-					$line .= ($type === '') ? '' : ' <info>Config</info>: ' . $type;
441
+					$line .= ($type === '') ? '' : ' <info>Config</info>: '.$type;
443 442
 				}
444 443
 
445 444
 			} else {
446 445
 				if ($lineNumber === 1 && !is_null($circle)) {
447
-					$line .= '<info>' . $circle->getSingleId() . '</info>';
446
+					$line .= '<info>'.$circle->getSingleId().'</info>';
448 447
 					if (!$this->configService->isLocalInstance($circle->getInstance())) {
449
-						$line .= '@' . $circle->getInstance();
448
+						$line .= '@'.$circle->getInstance();
450 449
 					}
451 450
 				}
452 451
 			}
Please login to merge, or discard this patch.
lib/CirclesQueryHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@
 block discarded – undo
144 144
 		$circle = new Circle();
145 145
 		$circle->importFromDatabase(
146 146
 			$data,
147
-			CoreQueryBuilder::HELPER . '_' . CoreQueryBuilder::CIRCLE . '_'
147
+			CoreQueryBuilder::HELPER.'_'.CoreQueryBuilder::CIRCLE.'_'
148 148
 		);
149 149
 
150 150
 		return $circle;
Please login to merge, or discard this patch.
lib/Db/MemberRequest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -221,8 +221,8 @@  discard block
 block discarded – undo
221 221
 			$qb->filterDirectMembership(CoreQueryBuilder::MEMBER, $filter);
222 222
 		}
223 223
 
224
-		$qb->orderBy($qb->getDefaultSelectAlias() . '.level', 'desc');
225
-		$qb->addOrderBy($qb->getDefaultSelectAlias() . '.cached_name', 'asc');
224
+		$qb->orderBy($qb->getDefaultSelectAlias().'.level', 'desc');
225
+		$qb->addOrderBy($qb->getDefaultSelectAlias().'.cached_name', 'asc');
226 226
 
227 227
 		return $this->getItemsFromRequest($qb);
228 228
 	}
@@ -246,8 +246,8 @@  discard block
 block discarded – undo
246 246
 		$qb->limitToMembersByInheritance(CoreQueryBuilder::MEMBER, $singleId);
247 247
 
248 248
 		$aliasMembership = $qb->generateAlias(CoreQueryBuilder::MEMBER, CoreQueryBuilder::MEMBERSHIPS);
249
-		$qb->orderBy($aliasMembership . '.inheritance_depth', 'asc')
250
-		   ->addGroupBy($aliasMembership . '.inheritance_depth');
249
+		$qb->orderBy($aliasMembership.'.inheritance_depth', 'asc')
250
+		   ->addGroupBy($aliasMembership.'.inheritance_depth');
251 251
 
252 252
 		return $this->getItemsFromRequest($qb);
253 253
 	}
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 		$qb = $this->getMemberSelectSql();
284 284
 		$qb->limitToCircleId($circleId);
285 285
 
286
-		$qb->andwhere($qb->expr()->nonEmptyString(CoreQueryBuilder::MEMBER . '.instance'));
286
+		$qb->andwhere($qb->expr()->nonEmptyString(CoreQueryBuilder::MEMBER.'.instance'));
287 287
 
288 288
 		return array_map(
289 289
 			function(Member $member): string {
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
 	 */
340 340
 	public function searchFederatedUsers(string $needle): array {
341 341
 		$qb = $this->getMemberSelectSql();
342
-		$qb->searchInDBField('user_id', '%' . $needle . '%');
342
+		$qb->searchInDBField('user_id', '%'.$needle.'%');
343 343
 
344 344
 		return $this->getItemsFromRequest($qb, true);
345 345
 	}
Please login to merge, or discard this patch.
lib/Service/FederatedEventService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -251,16 +251,16 @@
 block discarded – undo
251 251
 		try {
252 252
 			$test = new ReflectionClass($class);
253 253
 		} catch (ReflectionException $e) {
254
-			throw new FederatedEventException('ReflectionException with ' . $class . ': ' . $e->getMessage());
254
+			throw new FederatedEventException('ReflectionException with '.$class.': '.$e->getMessage());
255 255
 		}
256 256
 
257 257
 		if (!in_array(IFederatedItem::class, $test->getInterfaceNames())) {
258
-			throw new FederatedEventException($class . ' does not implements IFederatedItem');
258
+			throw new FederatedEventException($class.' does not implements IFederatedItem');
259 259
 		}
260 260
 
261 261
 		$item = OC::$server->get($class);
262 262
 		if (!($item instanceof IFederatedItem)) {
263
-			throw new FederatedEventException($class . ' not an IFederatedItem');
263
+			throw new FederatedEventException($class.' not an IFederatedItem');
264 264
 		}
265 265
 
266 266
 		if ($item instanceof IFederatedItemHighSeverity) {
Please login to merge, or discard this patch.
lib/Service/EventWrapperService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@
 block discarded – undo
152 152
 	 */
153 153
 	public function retry() {
154 154
 		$tokens = $this->getFailedEvents();
155
-		echo json_encode($tokens) . "\n";
155
+		echo json_encode($tokens)."\n";
156 156
 		foreach ($tokens as $token) {
157 157
 			$this->confirmStatus($token, true);
158 158
 		}
Please login to merge, or discard this patch.
lib/Circles/FileSharingBroadcaster.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 			$this->miscService = OC::$server->query(MiscService::class);
133 133
 		} catch (QueryException $e) {
134 134
 			OC::$server->getLogger()
135
-					   ->log(1, 'Circles: cannot init FileSharingBroadcaster - ' . $e->getMessage());
135
+					   ->log(1, 'Circles: cannot init FileSharingBroadcaster - '.$e->getMessage());
136 136
 		}
137 137
 
138 138
 		try {
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
 	 * @throws IllegalIDChangeException
326 326
 	 */
327 327
 	private function generateShare($data): IShare {
328
-		$this->logger->log(0, 'Regenerate shares from payload: ' . json_encode($data));
328
+		$this->logger->log(0, 'Regenerate shares from payload: '.json_encode($data));
329 329
 
330 330
 		$share = new Share($this->rootFolder, $this->userManager);
331 331
 		$share->setId($data['id']);
@@ -418,7 +418,7 @@  discard block
 block discarded – undo
418 418
 			$this->sendPasswordByMail($share, $displayName, $email, $password);
419 419
 		} catch (Exception $e) {
420 420
 			OC::$server->getLogger()
421
-					   ->log(1, 'Circles::sharedByMail - mail were not sent: ' . $e->getMessage());
421
+					   ->log(1, 'Circles::sharedByMail - mail were not sent: '.$e->getMessage());
422 422
 		}
423 423
 	}
424 424
 
@@ -436,8 +436,8 @@  discard block
 block discarded – undo
436 436
 		$message = $this->mailer->createMessage();
437 437
 
438 438
 		$this->logger->log(
439
-			0, "Sending mail to circle '" . $circleName . "': " . $email . ' file: ' . $fileName
440
-			   . ' - link: ' . $link
439
+			0, "Sending mail to circle '".$circleName."': ".$email.' file: '.$fileName
440
+			   . ' - link: '.$link
441 441
 		);
442 442
 
443 443
 		$subject = $this->l10n->t('%s shared »%s« with you.', [$author, $fileName]);
@@ -476,7 +476,7 @@  discard block
 block discarded – undo
476 476
 
477 477
 		$message = $this->mailer->createMessage();
478 478
 
479
-		$this->logger->log(0, "Sending password mail to circle '" . $circleName . "': " . $email);
479
+		$this->logger->log(0, "Sending password mail to circle '".$circleName."': ".$email);
480 480
 
481 481
 		$filename = $share->getNode()
482 482
 						  ->getName();
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
 		$message->setFrom([\OCP\Util::getDefaultEmailAddress($instanceName) => $senderName]);
532 532
 		if ($initiatorEmailAddress !== null) {
533 533
 			$message->setReplyTo([$initiatorEmailAddress => $initiatorDisplayName]);
534
-			$emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan());
534
+			$emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan());
535 535
 		} else {
536 536
 			$emailTemplate->addFooter();
537 537
 		}
@@ -566,7 +566,7 @@  discard block
 block discarded – undo
566 566
 		$emailTemplate->addHeader();
567 567
 		$emailTemplate->addHeading($subject, false);
568 568
 		$emailTemplate->addBodyText(
569
-			htmlspecialchars($text) . '<br>' . htmlspecialchars(
569
+			htmlspecialchars($text).'<br>'.htmlspecialchars(
570 570
 				$this->l10n->t('Click the button below to open it.')
571 571
 			), $text
572 572
 		);
@@ -612,7 +612,7 @@  discard block
 block discarded – undo
612 612
 			$this->sendMailExistingShares($template, $author->getCachedName(), $recipient);
613 613
 			$this->sendPasswordExistingShares($author, $recipient, $password);
614 614
 		} catch (Exception $e) {
615
-			$this->logger->log(2, 'Failed to send mail about existing share ' . $e->getMessage());
615
+			$this->logger->log(2, 'Failed to send mail about existing share '.$e->getMessage());
616 616
 		}
617 617
 	}
618 618
 
@@ -635,7 +635,7 @@  discard block
 block discarded – undo
635 635
 		$authorName = ($authorUser instanceof IUser) ? $authorUser->getDisplayName() : $author;
636 636
 		$authorEmail = ($authorUser instanceof IUser) ? $authorUser->getEMailAddress() : null;
637 637
 
638
-		$this->logger->log(0, "Sending password mail about existing files to '" . $email . "'");
638
+		$this->logger->log(0, "Sending password mail about existing files to '".$email."'");
639 639
 
640 640
 		$plainBodyPart = $this->l10n->t(
641 641
 			"%1\$s shared multiple files with you.\nYou should have already received a separate email with a link to access them.\n",
@@ -677,7 +677,7 @@  discard block
 block discarded – undo
677 677
 		$message->setFrom([\OCP\Util::getDefaultEmailAddress($instanceName) => $senderName]);
678 678
 		if ($authorEmail !== null) {
679 679
 			$message->setReplyTo([$authorEmail => $authorName]);
680
-			$emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan());
680
+			$emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan());
681 681
 		} else {
682 682
 			$emailTemplate->addFooter();
683 683
 		}
@@ -722,7 +722,7 @@  discard block
 block discarded – undo
722 722
 	 */
723 723
 	protected function generateMailExitingShares($author, $circleName) {
724 724
 		$this->logger->log(
725
-			0, "Generating mail about existing share mail from '" . $author . "' in "
725
+			0, "Generating mail about existing share mail from '".$author."' in "
726 726
 			   . $circleName
727 727
 		);
728 728
 
Please login to merge, or discard this patch.
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/Service/ConfigService.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 			return $value;
176 176
 		}
177 177
 
178
-		if (($value = $this->config->getSystemValue(Application::APP_ID . '.' . $key, '')) !== '') {
178
+		if (($value = $this->config->getSystemValue(Application::APP_ID.'.'.$key, '')) !== '') {
179 179
 			return $value;
180 180
 		}
181 181
 
@@ -429,7 +429,7 @@  discard block
 block discarded – undo
429 429
 		}
430 430
 
431 431
 		if (array_key_exists('port', $loopback)) {
432
-			$loopbackCloudId = $loopback['host'] . ':' . $loopback['port'];
432
+			$loopbackCloudId = $loopback['host'].':'.$loopback['port'];
433 433
 		} else {
434 434
 			$loopbackCloudId = $loopback['host'];
435 435
 		}
@@ -458,12 +458,12 @@  discard block
 block discarded – undo
458 458
 			$scheme = $this->getAppValue(self::LOOPBACK_CLOUD_SCHEME);
459 459
 		}
460 460
 
461
-		$base = $scheme . '://' . $instance;
461
+		$base = $scheme.'://'.$instance;
462 462
 		if ($route === '') {
463 463
 			return $base;
464 464
 		}
465 465
 
466
-		return $base . $this->urlGenerator->linkToRoute($route, $args);
466
+		return $base.$this->urlGenerator->linkToRoute($route, $args);
467 467
 	}
468 468
 
469 469
 
@@ -563,7 +563,7 @@  discard block
 block discarded – undo
563 563
 			return '';
564 564
 		}
565 565
 
566
-		return (($showAt) ? '@' : '') . $instance;
566
+		return (($showAt) ? '@' : '').$instance;
567 567
 	}
568 568
 
569 569
 
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.