Completed
Pull Request — master (#347)
by Maxence
02:15
created
lib/Model/BaseCircle.php 1 patch
Doc Comments   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
 	}
401 401
 
402 402
 	/**
403
-	 * @return string
403
+	 * @return integer
404 404
 	 */
405 405
 	public function getType() {
406 406
 		return $this->type;
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
 	}
426 426
 
427 427
 	/**
428
-	 * @param array $members
428
+	 * @param Member[] $members
429 429
 	 *
430 430
 	 * @return BaseCircle
431 431
 	 */
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
 	}
437 437
 
438 438
 	/**
439
-	 * @return array
439
+	 * @return Member[]
440 440
 	 */
441 441
 	public function getMembers() {
442 442
 		return $this->members;
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
 	}
455 455
 
456 456
 	/**
457
-	 * @return array
457
+	 * @return Member[]
458 458
 	 */
459 459
 	public function getGroups() {
460 460
 		return $this->groups;
@@ -472,7 +472,7 @@  discard block
 block discarded – undo
472 472
 	}
473 473
 
474 474
 	/**
475
-	 * @return array
475
+	 * @return FederatedLink[]
476 476
 	 */
477 477
 	public function getLinks() {
478 478
 		return $this->links;
@@ -508,7 +508,7 @@  discard block
 block discarded – undo
508 508
 //	}
509 509
 
510 510
 	/**
511
-	 * @param integer|string $type
511
+	 * @param string $type
512 512
 	 *
513 513
 	 * @return integer
514 514
 	 */
Please login to merge, or discard this patch.
lib/Db/MembersRequest.php 1 patch
Doc Comments   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
 	 * returns the index of a specific UserID in a Members List
233 233
 	 *
234 234
 	 * @param array $members
235
-	 * @param $userId
235
+	 * @param string $userId
236 236
 	 *
237 237
 	 * @return int
238 238
 	 */
@@ -545,6 +545,9 @@  discard block
 block discarded – undo
545 545
 	}
546 546
 
547 547
 
548
+	/**
549
+	 * @param string $groupId
550
+	 */
548 551
 	public function unlinkAllFromGroup($groupId) {
549 552
 		$qb = $this->getGroupsDeleteSql($groupId);
550 553
 		$qb->execute();
@@ -575,8 +578,6 @@  discard block
 block discarded – undo
575 578
 	/**
576 579
 	 * @param string $circleId
577 580
 	 * @param string $contactId
578
-	 * @param string $userId
579
-	 * @param int $type
580 581
 	 *
581 582
 	 * @return Member
582 583
 	 * @throws MemberDoesNotExistException
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
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 			$this->miscService = OC::$server->query(MiscService::class);
141 141
 		} catch (QueryException $e) {
142 142
 			\OC::$server->getLogger()
143
-						->log(1, 'Circles: cannot init FileSharingBroadcaster - ' . $e->getMessage());
143
+						->log(1, 'Circles: cannot init FileSharingBroadcaster - '.$e->getMessage());
144 144
 		}
145 145
 
146 146
 		try {
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
 	 * @throws IllegalIDChangeException
310 310
 	 */
311 311
 	private function generateShare($data) {
312
-		$this->logger->log(0, 'Regenerate shares from payload: ' . json_encode($data));
312
+		$this->logger->log(0, 'Regenerate shares from payload: '.json_encode($data));
313 313
 
314 314
 		$share = new Share($this->rootFolder, $this->userManager);
315 315
 		$share->setId($data['id']);
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
 			);
402 402
 		} catch (Exception $e) {
403 403
 			OC::$server->getLogger()
404
-					   ->log(1, 'Circles::sharedByMail - mail were not sent: ' . $e->getMessage());
404
+					   ->log(1, 'Circles::sharedByMail - mail were not sent: '.$e->getMessage());
405 405
 		}
406 406
 	}
407 407
 
@@ -419,8 +419,8 @@  discard block
 block discarded – undo
419 419
 		$message = $this->mailer->createMessage();
420 420
 
421 421
 		$this->logger->log(
422
-			0, "Sending mail to circle '" . $circleName . "': " . $email . ' file: ' . $fileName
423
-			   . ' - link: ' . $link
422
+			0, "Sending mail to circle '".$circleName."': ".$email.' file: '.$fileName
423
+			   . ' - link: '.$link
424 424
 		);
425 425
 
426 426
 		$subject = $this->l10n->t('%s shared »%s« with you.', [$author, $fileName]);
@@ -459,7 +459,7 @@  discard block
 block discarded – undo
459 459
 
460 460
 		$message = $this->mailer->createMessage();
461 461
 
462
-		$this->logger->log(0, "Sending password mail to circle '" . $circleName . "': " . $email);
462
+		$this->logger->log(0, "Sending password mail to circle '".$circleName."': ".$email);
463 463
 
464 464
 		$filename = $share->getNode()
465 465
 						  ->getName();
@@ -514,7 +514,7 @@  discard block
 block discarded – undo
514 514
 		$message->setFrom([\OCP\Util::getDefaultEmailAddress($instanceName) => $senderName]);
515 515
 		if ($initiatorEmailAddress !== null) {
516 516
 			$message->setReplyTo([$initiatorEmailAddress => $initiatorDisplayName]);
517
-			$emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan());
517
+			$emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan());
518 518
 		} else {
519 519
 			$emailTemplate->addFooter();
520 520
 		}
@@ -549,7 +549,7 @@  discard block
 block discarded – undo
549 549
 		$emailTemplate->addHeader();
550 550
 		$emailTemplate->addHeading($subject, false);
551 551
 		$emailTemplate->addBodyText(
552
-			htmlspecialchars($text) . '<br>' . htmlspecialchars(
552
+			htmlspecialchars($text).'<br>'.htmlspecialchars(
553 553
 				$this->l10n->t('Click the button below to open it.')
554 554
 			), $text
555 555
 		);
@@ -593,7 +593,7 @@  discard block
 block discarded – undo
593 593
 			$this->sendMailExistingShares($template, $author, $member->getUserId());
594 594
 			$this->sendPasswordExistingShares($author, $member->getUserId(), $password);
595 595
 		} catch (Exception $e) {
596
-			$this->logger->log(2, 'Failed to send mail about existing share ' . $e->getMessage());
596
+			$this->logger->log(2, 'Failed to send mail about existing share '.$e->getMessage());
597 597
 		}
598 598
 	}
599 599
 
@@ -617,7 +617,7 @@  discard block
 block discarded – undo
617 617
 		$authorName = ($authorUser instanceof IUser) ? $authorUser->getDisplayName() : $author;
618 618
 		$authorEmail = ($authorUser instanceof IUser) ? $authorUser->getEMailAddress() : null;
619 619
 
620
-		$this->logger->log(0, "Sending password mail about existing files to '" . $email . "'");
620
+		$this->logger->log(0, "Sending password mail about existing files to '".$email."'");
621 621
 
622 622
 		$plainBodyPart = $this->l10n->t(
623 623
 			"%1\$s shared multiple files with you.\nYou should have already received a separate mail with a link to access them.\n",
@@ -659,7 +659,7 @@  discard block
 block discarded – undo
659 659
 		$message->setFrom([\OCP\Util::getDefaultEmailAddress($instanceName) => $senderName]);
660 660
 		if ($authorEmail !== null) {
661 661
 			$message->setReplyTo([$authorEmail => $authorName]);
662
-			$emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan());
662
+			$emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan());
663 663
 		} else {
664 664
 			$emailTemplate->addFooter();
665 665
 		}
@@ -704,7 +704,7 @@  discard block
 block discarded – undo
704 704
 	 */
705 705
 	protected function generateMailExitingShares($author, $circleName) {
706 706
 		$this->logger->log(
707
-			0, "Generating mail about existing share mail from '" . $author . "' in "
707
+			0, "Generating mail about existing share mail from '".$author."' in "
708 708
 			   . $circleName
709 709
 		);
710 710
 
Please login to merge, or discard this patch.
lib/Service/DavService.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -486,7 +486,6 @@
 block discarded – undo
486 486
 
487 487
 
488 488
 	/**
489
-	 * @param DavCard $davCard
490 489
 	 */
491 490
 	private function manageDeprecatedContacts() {
492 491
 		$contacts = $this->membersRequest->getMembersByContactId();
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 	public function onDeleteCard(GenericEvent $event) {
153 153
 		$davCard = $this->generateDavCard($event, true);
154 154
 
155
-		$this->miscService->log('Deleting Card: ' . json_encode($davCard), 1);
155
+		$this->miscService->log('Deleting Card: '.json_encode($davCard), 1);
156 156
 		$this->membersRequest->removeMembersByContactId($davCard->getUniqueId(), Member::TYPE_USER);
157 157
 	}
158 158
 
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 	 *
207 207
 	 */
208 208
 	private function manageDavCard(DavCard $davCard) {
209
-		$this->miscService->log('Updating Card: ' . json_encode($davCard), 1);
209
+		$this->miscService->log('Updating Card: '.json_encode($davCard), 1);
210 210
 		$this->manageCircles($davCard);
211 211
 		$this->manageContact($davCard);
212 212
 	}
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
 			}
321 321
 		}
322 322
 
323
-		$davCard->setUserId($davCard->getOwner() . ':' . $davCard->getContactId());
323
+		$davCard->setUserId($davCard->getOwner().':'.$davCard->getContactId());
324 324
 
325 325
 		return DavCard::TYPE_CONTACT;
326 326
 	}
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
 				continue;
379 379
 			}
380 380
 
381
-			$circle = new Circle(Circle::CIRCLES_PUBLIC, $group . ' - ' . $this->uuid(5));
381
+			$circle = new Circle(Circle::CIRCLES_PUBLIC, $group.' - '.$this->uuid(5));
382 382
 			$circle->setContactAddressBook($davCard->getAddressBookId());
383 383
 			$circle->setContactGroupName($group);
384 384
 
@@ -477,7 +477,7 @@  discard block
 block discarded – undo
477 477
 		$this->manageDeprecatedCircles();
478 478
 		$users = $this->userManager->search('');
479 479
 		foreach ($users as $user) {
480
-			$books = $this->cardDavBackend->getAddressBooksForUser('principals/users/' . $user->getUID());
480
+			$books = $this->cardDavBackend->getAddressBooksForUser('principals/users/'.$user->getUID());
481 481
 			foreach ($books as $book) {
482 482
 				$this->migrateBook($book['id']);
483 483
 			}
Please login to merge, or discard this patch.
appinfo/app.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 use OCA\Circles\AppInfo\Application;
31 31
 
32 32
 
33
-require_once __DIR__ . '/autoload.php';
33
+require_once __DIR__.'/autoload.php';
34 34
 
35 35
 
36 36
 $app = \OC::$server->query(Application::class);
Please login to merge, or discard this patch.
lib/Model/DavCard.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@
 block discarded – undo
146 146
 	 * @return string
147 147
 	 */
148 148
 	public function getUniqueId(): string {
149
-		return $this->getAddressBookId() . '/' . $this->getCardUri();
149
+		return $this->getAddressBookId().'/'.$this->getCardUri();
150 150
 	}
151 151
 
152 152
 
Please login to merge, or discard this patch.