Completed
Pull Request — master (#516)
by Maxence
02:25
created
lib/Circles/FileSharingBroadcaster.php 2 patches
Doc Comments   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -427,7 +427,7 @@  discard block
 block discarded – undo
427 427
 	 * @param $fileName
428 428
 	 * @param string $link
429 429
 	 * @param string $author
430
-	 * @param $circleName
430
+	 * @param string $circleName
431 431
 	 * @param string $email
432 432
 	 *
433 433
 	 * @throws Exception
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
 	 * @param string $circleName
465 465
 	 * @param string $email
466 466
 	 *
467
-	 * @param $password
467
+	 * @param string $password
468 468
 	 *
469 469
 	 * @throws NotFoundException
470 470
 	 * @throws Exception
@@ -546,7 +546,7 @@  discard block
 block discarded – undo
546 546
 	 * @param $subject
547 547
 	 * @param $text
548 548
 	 * @param $fileName
549
-	 * @param $link
549
+	 * @param string $link
550 550
 	 * @param string $author
551 551
 	 * @param string $circleName
552 552
 	 *
@@ -714,7 +714,7 @@  discard block
 block discarded – undo
714 714
 
715 715
 
716 716
 	/**
717
-	 * @param $author
717
+	 * @param string $author
718 718
 	 * @param string $circleName
719 719
 	 *
720 720
 	 * @return IEMailTemplate
@@ -757,8 +757,8 @@  discard block
 block discarded – undo
757 757
 
758 758
 	/**
759 759
 	 * @param IEMailTemplate $emailTemplate
760
-	 * @param $author
761
-	 * @param $recipient
760
+	 * @param string $author
761
+	 * @param string $recipient
762 762
 	 *
763 763
 	 * @throws Exception
764 764
 	 */
Please login to merge, or discard this 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 mail 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/Service/GSUpstreamService.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -340,7 +340,7 @@
 block discarded – undo
340 340
 
341 341
 
342 342
 	/**
343
-	 * @param array $sync
343
+	 * @param Circle[] $sync
344 344
 	 *
345 345
 	 * @throws GSStatusException
346 346
 	 */
Please login to merge, or discard this patch.
lib/Service/MiscService.php 1 patch
Doc Comments   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
 	/**
80 80
 	 * @param $arr
81
-	 * @param $k
81
+	 * @param string $k
82 82
 	 *
83 83
 	 * @param string $default
84 84
 	 *
@@ -93,6 +93,9 @@  discard block
 block discarded – undo
93 93
 	}
94 94
 
95 95
 
96
+	/**
97
+	 * @param string[] $arr
98
+	 */
96 99
 	public static function mustContains($data, $arr) {
97 100
 		if (!is_array($arr)) {
98 101
 			$arr = [$arr];
@@ -250,7 +253,7 @@  discard block
 block discarded – undo
250 253
 
251 254
 
252 255
 	/**
253
-	 * @param $ident
256
+	 * @param string $ident
254 257
 	 *
255 258
 	 * @return mixed|string
256 259
 	 * @deprecated
Please login to merge, or discard this patch.
lib/Api/v1/Circles.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
 	 */
464 464
 	public static function generateLink($circleUniqueId) {
465 465
 		return OC::$server->getURLGenerator()
466
-						  ->linkToRoute('circles.Navigation.navigate') . '#' . $circleUniqueId;
466
+						  ->linkToRoute('circles.Navigation.navigate').'#'.$circleUniqueId;
467 467
 	}
468 468
 
469 469
 
@@ -478,7 +478,7 @@  discard block
 block discarded – undo
478 478
 	 */
479 479
 	public static function generateAbsoluteLink($circleUniqueId) {
480 480
 		return OC::$server->getURLGenerator()
481
-						  ->linkToRouteAbsolute('circles.Navigation.navigate') . '#' . $circleUniqueId;
481
+						  ->linkToRouteAbsolute('circles.Navigation.navigate').'#'.$circleUniqueId;
482 482
 	}
483 483
 
484 484
 
@@ -493,8 +493,8 @@  discard block
 block discarded – undo
493 493
 	 */
494 494
 	public static function generateRemoteLink(FederatedLink $link) {
495 495
 		return OC::$server->getURLGenerator()
496
-						  ->linkToRoute('circles.Navigation.navigate') . '#' . $link->getUniqueId()
497
-			   . '-' . $link->getToken();
496
+						  ->linkToRoute('circles.Navigation.navigate').'#'.$link->getUniqueId()
497
+			   . '-'.$link->getToken();
498 498
 	}
499 499
 
500 500
 
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
 	 */
506 506
 	public static function generateUserParameter(SharingFrame $frame) {
507 507
 		if ($frame->getCloudId() !== null) {
508
-			$name = $frame->getAuthor() . '@' . $frame->getCloudId();
508
+			$name = $frame->getAuthor().'@'.$frame->getCloudId();
509 509
 		} else {
510 510
 			try {
511 511
 				$membersService = \OC::$server->query(MembersService::class);
Please login to merge, or discard this patch.
lib/Db/CoreRequestBuilder.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -346,8 +346,8 @@  discard block
 block discarded – undo
346 346
 		$expr = $qb->expr();
347 347
 
348 348
 		if ($pf === '') {
349
-			$p = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias . '.' : '';
350
-			$qb->andWhere($expr->gte($p . 'level', $qb->createNamedParameter($level)));
349
+			$p = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias.'.' : '';
350
+			$qb->andWhere($expr->gte($p.'level', $qb->createNamedParameter($level)));
351 351
 
352 352
 			return;
353 353
 		}
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
 			if ($p === 'g' && !$this->leftJoinedNCGroupAndUser) {
377 377
 				continue;
378 378
 			}
379
-			$orX->add($expr->gte($p . '.level', $qb->createNamedParameter($level)));
379
+			$orX->add($expr->gte($p.'.level', $qb->createNamedParameter($level)));
380 380
 		}
381 381
 
382 382
 		return $orX;
@@ -391,12 +391,12 @@  discard block
 block discarded – undo
391 391
 	protected function limitToMembersAndAlmost(IQueryBuilder $qb) {
392 392
 		$expr = $qb->expr();
393 393
 
394
-		$pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias . '.' : '';
394
+		$pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias.'.' : '';
395 395
 
396 396
 		$orX = $expr->orX();
397
-		$orX->add($expr->eq($pf . 'status', $qb->createNamedParameter(Member::STATUS_MEMBER)));
398
-		$orX->add($expr->eq($pf . 'status', $qb->createNamedParameter(Member::STATUS_INVITED)));
399
-		$orX->add($expr->eq($pf . 'status', $qb->createNamedParameter(Member::STATUS_REQUEST)));
397
+		$orX->add($expr->eq($pf.'status', $qb->createNamedParameter(Member::STATUS_MEMBER)));
398
+		$orX->add($expr->eq($pf.'status', $qb->createNamedParameter(Member::STATUS_INVITED)));
399
+		$orX->add($expr->eq($pf.'status', $qb->createNamedParameter(Member::STATUS_REQUEST)));
400 400
 
401 401
 		$qb->andWhere($orX);
402 402
 	}
@@ -409,8 +409,8 @@  discard block
 block discarded – undo
409 409
 	 */
410 410
 	public function limitToDBField(IQueryBuilder $qb, $field, $value) {
411 411
 		$expr = $qb->expr();
412
-		$pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias . '.' : '';
413
-		$qb->andWhere($expr->eq($pf . $field, $qb->createNamedParameter($value)));
412
+		$pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias.'.' : '';
413
+		$qb->andWhere($expr->eq($pf.$field, $qb->createNamedParameter($value)));
414 414
 	}
415 415
 
416 416
 
@@ -421,8 +421,8 @@  discard block
 block discarded – undo
421 421
 	 */
422 422
 	private function limitToDBFieldOrGreater(IQueryBuilder $qb, $field, $value) {
423 423
 		$expr = $qb->expr();
424
-		$pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias . '.' : '';
425
-		$qb->andWhere($expr->gte($pf . $field, $qb->createNamedParameter($value)));
424
+		$pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias.'.' : '';
425
+		$qb->andWhere($expr->gte($pf.$field, $qb->createNamedParameter($value)));
426 426
 	}
427 427
 
428 428
 
@@ -437,9 +437,9 @@  discard block
 block discarded – undo
437 437
 	protected function limitToNCGroupUser(IQueryBuilder $qb, $userId = '') {
438 438
 		$expr = $qb->expr();
439 439
 
440
-		$pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias . '.' : '';
440
+		$pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->default_select_alias.'.' : '';
441 441
 
442
-		$and = $expr->andX($expr->eq($pf . 'user_id', 'ncgu.gid'));
442
+		$and = $expr->andX($expr->eq($pf.'user_id', 'ncgu.gid'));
443 443
 		if ($userId !== '') {
444 444
 			$and->add($expr->eq('ncgu.uid', $qb->createNamedParameter($userId)));
445 445
 		} else {
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
 		}
463 463
 
464 464
 		$expr = $qb->expr();
465
-		$pf = $this->default_select_alias . '.';
465
+		$pf = $this->default_select_alias.'.';
466 466
 
467 467
 		/** @noinspection PhpMethodParametersCountMismatchInspection */
468 468
 		$qb->selectAlias('lc.type', 'circle_type')
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
 		   ->selectAlias('lc.settings', 'circle_settings')
472 472
 		   ->leftJoin(
473 473
 			   $this->default_select_alias, CoreRequestBuilder::TABLE_CIRCLES, 'lc',
474
-			   $expr->eq($pf . 'circle_id', 'lc.unique_id')
474
+			   $expr->eq($pf.'circle_id', 'lc.unique_id')
475 475
 		   );
476 476
 	}
477 477
 
Please login to merge, or discard this patch.
lib/Service/GlobalScaleService.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -167,12 +167,12 @@  discard block
 block discarded – undo
167 167
 		try {
168 168
 			$gs = OC::$server->query($class);
169 169
 			if (!$gs instanceof AGlobalScaleEvent) {
170
-				throw new GlobalScaleEventException($class . ' not an AGlobalScaleEvent');
170
+				throw new GlobalScaleEventException($class.' not an AGlobalScaleEvent');
171 171
 			}
172 172
 
173 173
 			return $gs;
174 174
 		} catch (QueryException $e) {
175
-			throw new GlobalScaleEventException('AGlobalScaleEvent ' . $class . ' not found');
175
+			throw new GlobalScaleEventException('AGlobalScaleEvent '.$class.' not found');
176 176
 		}
177 177
 	}
178 178
 
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 			}
192 192
 		}
193 193
 
194
-		return md5('gskey:' . $key);
194
+		return md5('gskey:'.$key);
195 195
 	}
196 196
 
197 197
 	/**
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
 				$instances = $this->retrieveJson($request);
239 239
 			} catch (RequestContentException | RequestNetworkException | RequestResultSizeException | RequestServerException | RequestResultNotJsonException $e) {
240 240
 				$this->miscService->log(
241
-					'Issue while retrieving instances from lookup: ' . get_class($e) . ' ' . $e->getMessage()
241
+					'Issue while retrieving instances from lookup: '.get_class($e).' '.$e->getMessage()
242 242
 				);
243 243
 
244 244
 				return [];
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
 		$absolute = $this->urlGenerator->linkToRouteAbsolute('circles.Navigation.navigate');
269 269
 		$local = parse_url($absolute);
270 270
 
271
-		return [$local['host'] . ':' . $local['port']];
271
+		return [$local['host'].':'.$local['port']];
272 272
 	}
273 273
 
274 274
 
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
 		$className = $event->getType();
283 283
 		if (substr($className, 0, 25) !== '\OCA\Circles\GlobalScale\\' || strpos($className, '.')) {
284 284
 			throw new GlobalScaleEventException(
285
-				$className . ' does not seems to be a secured AGlobalScaleEvent'
285
+				$className.' does not seems to be a secured AGlobalScaleEvent'
286 286
 			);
287 287
 		}
288 288
 
Please login to merge, or discard this patch.
lib/Service/DavService.php 1 patch
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 	public function onDeleteCard(GenericEvent $event) {
165 165
 		$davCard = $this->generateDavCard($event, true);
166 166
 
167
-		$this->miscService->log('Deleting Card: ' . json_encode($davCard), 1);
167
+		$this->miscService->log('Deleting Card: '.json_encode($davCard), 1);
168 168
 		$this->membersRequest->removeMembersByContactId($davCard->getUniqueId(), Member::TYPE_USER);
169 169
 		$this->manageDeprecatedCircles($davCard->getAddressBookId());
170 170
 		$this->manageDeprecatedMembers($davCard);
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 	 */
206 206
 	private function generateDavCardFromCard(int $bookId, array $card): DavCard {
207 207
 		$this->miscService->log(
208
-			'generating DavCard Model from book=' . $bookId . ' from ' . json_encode($card), 0
208
+			'generating DavCard Model from book='.$bookId.' from '.json_encode($card), 0
209 209
 		);
210 210
 
211 211
 		$davCard = new DavCard();
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 		$davCard->setOwner($this->getOwnerFromAddressBook($bookId));
216 216
 		$davCard->importFromDav($card['carddata']);
217 217
 
218
-		$this->miscService->log('generated DavCard Model: ' . json_encode($davCard), 0);
218
+		$this->miscService->log('generated DavCard Model: '.json_encode($davCard), 0);
219 219
 
220 220
 		return $davCard;
221 221
 	}
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 	 *
227 227
 	 */
228 228
 	private function manageDavCard(DavCard $davCard) {
229
-		$this->miscService->log('Updating Card: ' . json_encode($davCard), 1);
229
+		$this->miscService->log('Updating Card: '.json_encode($davCard), 1);
230 230
 		$this->manageCircles($davCard);
231 231
 		$this->manageContact($davCard);
232 232
 	}
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
 	 */
261 261
 	private function manageDeprecatedMembers(DavCard $davCard) {
262 262
 		$this->miscService->log(
263
-			'Managing deprecated circles memberships from DavCard Model: ' . json_encode($davCard), 0
263
+			'Managing deprecated circles memberships from DavCard Model: '.json_encode($davCard), 0
264 264
 		);
265 265
 
266 266
 		$circles = array_map(
@@ -271,13 +271,13 @@  discard block
 block discarded – undo
271 271
 
272 272
 		$members = $this->membersRequest->getMembersByContactId($davCard->getUniqueId());
273 273
 		$this->miscService->log(
274
-			'Found ' . sizeof($members) . ' memberships with contactId=' . $davCard->getUniqueId(), 0
274
+			'Found '.sizeof($members).' memberships with contactId='.$davCard->getUniqueId(), 0
275 275
 		);
276 276
 
277 277
 		foreach ($members as $member) {
278 278
 			if (!in_array($member->getCircleId(), $circles)) {
279 279
 				$this->miscService->log(
280
-					'Removing membership ' . $member->getMemberId() . ' from ' . $member->getCircleId(), 0
280
+					'Removing membership '.$member->getMemberId().' from '.$member->getCircleId(), 0
281 281
 				);
282 282
 				$this->membersRequest->removeMember($member);
283 283
 			}
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
 			}
358 358
 		}
359 359
 
360
-		$davCard->setUserId($davCard->getOwner() . ':' . $davCard->getContactId());
360
+		$davCard->setUserId($davCard->getOwner().':'.$davCard->getContactId());
361 361
 
362 362
 		return DavCard::TYPE_CONTACT;
363 363
 	}
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
 		);
403 403
 
404 404
 		$this->miscService->log(
405
-			'manage Circles from DavCard: ' . json_encode($fromCard) . ' - current: ' . json_encode($current)
405
+			'manage Circles from DavCard: '.json_encode($fromCard).' - current: '.json_encode($current)
406 406
 		);
407 407
 
408 408
 		$this->manageNewCircles($davCard, $fromCard, $current);
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
 
426 426
 			$user = $this->userManager->get($davCard->getOwner());
427 427
 			$circle = new Circle(
428
-				$this->configService->contactsBackendType(), $group . ' - ' . $user->getDisplayName()
428
+				$this->configService->contactsBackendType(), $group.' - '.$user->getDisplayName()
429 429
 			);
430 430
 			$circle->setAltName($group);
431 431
 			$circle->generateUniqueId();
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
 			$circle->setContactGroupName($group);
434 434
 
435 435
 			$this->miscService->log(
436
-				'creating new Circle: ' . json_encode($circle) . ', with owner=' . $davCard->getOwner(), 0
436
+				'creating new Circle: '.json_encode($circle).', with owner='.$davCard->getOwner(), 0
437 437
 			);
438 438
 			try {
439 439
 				$this->circlesRequest->createCircle($circle);
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
 				$owner->setStatus(Member::STATUS_MEMBER);
443 443
 				$this->membersService->updateCachedName($owner);
444 444
 
445
-				$this->miscService->log('creating new Member: ' . json_encode($owner), 0);
445
+				$this->miscService->log('creating new Member: '.json_encode($owner), 0);
446 446
 				try {
447 447
 					$this->membersRequest->createMember($owner);
448 448
 				} catch (MemberAlreadyExistsException $e) {
@@ -457,7 +457,7 @@  discard block
 block discarded – undo
457 457
 	 * @param DavCard $davCard
458 458
 	 */
459 459
 	private function assignCirclesToCard(DavCard $davCard) {
460
-		$this->miscService->log('assigning Circles to DavCard Model: ' . json_encode($davCard), 0);
460
+		$this->miscService->log('assigning Circles to DavCard Model: '.json_encode($davCard), 0);
461 461
 		foreach ($davCard->getGroups() as $group) {
462 462
 			try {
463 463
 				$davCard->addCircle(
@@ -467,7 +467,7 @@  discard block
 block discarded – undo
467 467
 			}
468 468
 		}
469 469
 
470
-		$this->miscService->log('assigned Circles to DavCard Model: ' . json_encode($davCard), 0);
470
+		$this->miscService->log('assigned Circles to DavCard Model: '.json_encode($davCard), 0);
471 471
 	}
472 472
 
473 473
 
@@ -512,12 +512,12 @@  discard block
 block discarded – undo
512 512
 	 * @return string
513 513
 	 */
514 514
 	public function getOwnerFromAddressBook(int $bookId): string {
515
-		$this->miscService->log('Retrieving Owner from book:' . $bookId, 0);
515
+		$this->miscService->log('Retrieving Owner from book:'.$bookId, 0);
516 516
 		$data = $this->cardDavBackend->getAddressBookById($bookId);
517 517
 
518 518
 		// let's assume the format is principals/users/OWNER
519 519
 		$owner = substr($data['principaluri'], 17);
520
-		$this->miscService->log('Retrieved Owner:' . $owner, 0);
520
+		$this->miscService->log('Retrieved Owner:'.$owner, 0);
521 521
 
522 522
 		return $owner;
523 523
 	}
@@ -534,12 +534,12 @@  discard block
 block discarded – undo
534 534
 		$this->manageDeprecatedContacts();
535 535
 		$this->manageDeprecatedCircles();
536 536
 		$users = $this->userManager->search('');
537
-		$this->miscService->log('initiating migration for ' . sizeof($users) . ' users', 0);
537
+		$this->miscService->log('initiating migration for '.sizeof($users).' users', 0);
538 538
 		foreach ($users as $user) {
539
-			$this->miscService->log('retrieving books for user=' . $user->getUID(), 0);
540
-			$books = $this->cardDavBackend->getAddressBooksForUser('principals/users/' . $user->getUID());
539
+			$this->miscService->log('retrieving books for user='.$user->getUID(), 0);
540
+			$books = $this->cardDavBackend->getAddressBooksForUser('principals/users/'.$user->getUID());
541 541
 
542
-			$this->miscService->log('initiating migration for user=' . $user->getUID(), 0);
542
+			$this->miscService->log('initiating migration for user='.$user->getUID(), 0);
543 543
 			foreach ($books as $book) {
544 544
 				$this->migrateBook($book['id']);
545 545
 			}
@@ -552,16 +552,16 @@  discard block
 block discarded – undo
552 552
 	private function manageDeprecatedContacts() {
553 553
 		$contacts = $this->membersRequest->getMembersByContactId();
554 554
 		$this->miscService->log(
555
-			'Managing Deprecated Contacts, checking ' . sizeof($contacts) . ' known contacts in database', 0
555
+			'Managing Deprecated Contacts, checking '.sizeof($contacts).' known contacts in database', 0
556 556
 		);
557 557
 
558 558
 		foreach ($contacts as $contact) {
559 559
 			try {
560 560
 				$this->getDavCardFromMember($contact);
561
-				$this->miscService->log('Contact is not deprecated: ' . json_encode($contact));
561
+				$this->miscService->log('Contact is not deprecated: '.json_encode($contact));
562 562
 			} catch (MemberDoesNotExistException $e) {
563 563
 				$this->miscService->log(
564
-					'Contact is deprecated and will be removed: ' . json_encode($contact)
564
+					'Contact is deprecated and will be removed: '.json_encode($contact)
565 565
 				);
566 566
 				$this->membersRequest->removeMember($contact);
567 567
 			}
@@ -576,12 +576,12 @@  discard block
 block discarded – undo
576 576
 	 */
577 577
 	private function manageDeprecatedCircles(int $bookId = 0) {
578 578
 		$knownBooks = [$bookId];
579
-		$this->miscService->log('Managing Deprecated Circles, using bookId: ' . $bookId, 0);
579
+		$this->miscService->log('Managing Deprecated Circles, using bookId: '.$bookId, 0);
580 580
 
581 581
 		if ($bookId > 0) {
582 582
 			$knownBooks = [];
583 583
 			$contacts = $this->membersRequest->getMembersByContactId();
584
-			$this->miscService->log(sizeof($contacts) . ' known members as contacts in Circles DB', 0);
584
+			$this->miscService->log(sizeof($contacts).' known members as contacts in Circles DB', 0);
585 585
 
586 586
 			foreach ($contacts as $contact) {
587 587
 				list($bookId,) = explode('/', $contact->getContactId(), 2);
@@ -593,17 +593,17 @@  discard block
 block discarded – undo
593 593
 			}
594 594
 		}
595 595
 
596
-		$this->miscService->log('Known books: ' . json_encode($knownBooks), 0);
596
+		$this->miscService->log('Known books: '.json_encode($knownBooks), 0);
597 597
 		foreach ($knownBooks as $bookId) {
598
-			$this->miscService->log('retrieving local Circles data for bookId=' . $bookId, 0);
598
+			$this->miscService->log('retrieving local Circles data for bookId='.$bookId, 0);
599 599
 			$circles = $this->circlesRequest->getFromContactBook($bookId);
600 600
 			$this->miscService->log(
601
-				'Known circles for bookId=' . $bookId . ': ' . json_encode($circles), 0
601
+				'Known circles for bookId='.$bookId.': '.json_encode($circles), 0
602 602
 			);
603 603
 
604 604
 			$fromBook = $this->getExistingCirclesFromBook($bookId);
605 605
 			$this->miscService->log(
606
-				'Generated circles from bookId=' . $bookId . ': ' . json_encode($fromBook), 0
606
+				'Generated circles from bookId='.$bookId.': '.json_encode($fromBook), 0
607 607
 			);
608 608
 
609 609
 			foreach ($circles as $circle) {
@@ -612,7 +612,7 @@  discard block
 block discarded – undo
612 612
 				}
613 613
 
614 614
 				$this->miscService->log(
615
-					$circle->getUniqueId() . ' is a deprecated Circle and will be destroyed', 0
615
+					$circle->getUniqueId().' is a deprecated Circle and will be destroyed', 0
616 616
 				);
617 617
 
618 618
 				$this->membersRequest->removeAllFromCircle($circle->getUniqueId());
@@ -634,7 +634,7 @@  discard block
 block discarded – undo
634 634
 		$cards = $this->cardDavBackend->getCards($bookId);
635 635
 
636 636
 		$this->miscService->log(
637
-			'retrieving existing circles from bookId=' . $bookId . ' in ' . sizeof($cards) . ' cards', 0
637
+			'retrieving existing circles from bookId='.$bookId.' in '.sizeof($cards).' cards', 0
638 638
 		);
639 639
 		foreach ($cards as $card) {
640 640
 			$davCard = $this->generateDavCardFromCard($bookId, $card);
@@ -642,7 +642,7 @@  discard block
 block discarded – undo
642 642
 			$circles = array_merge($circles, $davCard->getCircles());
643 643
 		}
644 644
 
645
-		$this->miscService->log('Found ' . sizeof($circles) . ' Circles from book=' . $bookId, 0);
645
+		$this->miscService->log('Found '.sizeof($circles).' Circles from book='.$bookId, 0);
646 646
 		$existing = array_unique(
647 647
 			array_map(
648 648
 				function(Circle $circle) {
@@ -652,7 +652,7 @@  discard block
 block discarded – undo
652 652
 		);
653 653
 
654 654
 		$this->miscService->log(
655
-			'retrieved existing circles from book=' . $bookId . ': ' . json_encode($existing), 0
655
+			'retrieved existing circles from book='.$bookId.': '.json_encode($existing), 0
656 656
 		);
657 657
 
658 658
 		return $existing;
@@ -667,14 +667,14 @@  discard block
 block discarded – undo
667 667
 	 */
668 668
 	public function getDavCardFromMember(Member $contact): DavCard {
669 669
 		list($bookId, $cardUri) = explode('/', $contact->getContactId(), 2);
670
-		$this->miscService->log('Retrieving DavCard from book:' . $bookId . ', uri:' . $cardUri, 0);
670
+		$this->miscService->log('Retrieving DavCard from book:'.$bookId.', uri:'.$cardUri, 0);
671 671
 
672 672
 		$cards = $this->cardDavBackend->getCards($bookId);
673
-		$this->miscService->log('Book contains ' . sizeof($cards) . ' cards', 0);
673
+		$this->miscService->log('Book contains '.sizeof($cards).' cards', 0);
674 674
 		foreach ($cards as $card) {
675 675
 			if ($card['uri'] === $cardUri) {
676 676
 				$davCard = $this->generateDavCardFromCard($bookId, $card);
677
-				$this->miscService->log('Retrieved DavCard: ' . json_encode($card));
677
+				$this->miscService->log('Retrieved DavCard: '.json_encode($card));
678 678
 
679 679
 				return $davCard;
680 680
 			}
@@ -692,11 +692,11 @@  discard block
 block discarded – undo
692 692
 			return;
693 693
 		}
694 694
 
695
-		$this->miscService->log('migrating book: ' . $bookId, 0);
695
+		$this->miscService->log('migrating book: '.$bookId, 0);
696 696
 		$owner = $this->getOwnerFromAddressBook($bookId);
697 697
 
698 698
 		$cards = $this->cardDavBackend->getCards($bookId);
699
-		$this->miscService->log('found ' . sizeof($cards) . 'cards from book=' . $bookId, 0);
699
+		$this->miscService->log('found '.sizeof($cards).'cards from book='.$bookId, 0);
700 700
 
701 701
 		foreach ($cards as $card) {
702 702
 			$davCard = new DavCard();
Please login to merge, or discard this patch.
lib/Search/GlobalScaleUsers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@
 block discarded – undo
95 95
 		RequestResultNotJsonException $e
96 96
 		) {
97 97
 			$this->miscService->log(
98
-				'Issue while search users from lookup: ' . get_class($e) . ' ' . $e->getMessage()
98
+				'Issue while search users from lookup: '.get_class($e).' '.$e->getMessage()
99 99
 			);
100 100
 
101 101
 			return [];
Please login to merge, or discard this patch.
lib/Activity/ProviderParser.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 				continue;
138 138
 			}
139 139
 
140
-			$replace['{' . $k . '}'] = $data[$k]['_parsed'];
140
+			$replace['{'.$k.'}'] = $data[$k]['_parsed'];
141 141
 		}
142 142
 
143 143
 		$line = strtr($line, $replace);
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
 		return [
302 302
 			'type'    => $member->getTypeName(),
303 303
 			'id'      => $member->getUserId(),
304
-			'name'    => $member->getCachedName() . ' (' . $member->getTypeString() . ')',
304
+			'name'    => $member->getCachedName().' ('.$member->getTypeString().')',
305 305
 			'_parsed' => $member->getCachedName()
306 306
 		];
307 307
 	}
@@ -337,8 +337,8 @@  discard block
 block discarded – undo
337 337
 		return [
338 338
 			'type'    => 'circle',
339 339
 			'id'      => $link->getUniqueId(),
340
-			'name'    => $link->getToken() . '@' . $link->getAddress(),
341
-			'_parsed' => $link->getToken() . '@' . $link->getAddress()
340
+			'name'    => $link->getToken().'@'.$link->getAddress(),
341
+			'_parsed' => $link->getToken().'@'.$link->getAddress()
342 342
 		];
343 343
 	}
344 344
 
Please login to merge, or discard this patch.