| @@ -181,7 +181,7 @@ discard block | ||
| 181 | 181 | * | 
| 182 | 182 | * @param SharingFrame $frame | 
| 183 | 183 | * @param DeprecatedCircle $circle | 
| 184 | - * @param $broadcast | |
| 184 | + * @param string|null $broadcast | |
| 185 | 185 | */ | 
| 186 | 186 |  	private function generateHeaders(SharingFrame $frame, DeprecatedCircle $circle, $broadcast) { | 
| 187 | 187 | |
| @@ -220,7 +220,7 @@ discard block | ||
| 220 | 220 | * Please use getFrameFromCircle(); | 
| 221 | 221 | * | 
| 222 | 222 | * @param string $circleUniqueId | 
| 223 | - * @param $viewerId | |
| 223 | + * @param string $viewerId | |
| 224 | 224 | * | 
| 225 | 225 | * @return SharingFrame[] | 
| 226 | 226 | * @throws CircleDoesNotExistException | 
| @@ -569,24 +569,24 @@ | ||
| 569 | 569 |  		switch ($type) { | 
| 570 | 570 | case DeprecatedCircle::CIRCLES_PERSONAL: | 
| 571 | 571 | return $urlGen->getAbsoluteURL( | 
| 572 | - $urlGen->imagePath(Application::APP_ID, 'personal' . $ext) | |
| 572 | + $urlGen->imagePath(Application::APP_ID, 'personal'.$ext) | |
| 573 | 573 | ); | 
| 574 | 574 | case DeprecatedCircle::CIRCLES_CLOSED: | 
| 575 | 575 | return $urlGen->getAbsoluteURL( | 
| 576 | - $urlGen->imagePath(Application::APP_ID, 'closed' . $ext) | |
| 576 | + $urlGen->imagePath(Application::APP_ID, 'closed'.$ext) | |
| 577 | 577 | ); | 
| 578 | 578 | case DeprecatedCircle::CIRCLES_SECRET: | 
| 579 | 579 | return $urlGen->getAbsoluteURL( | 
| 580 | - $urlGen->imagePath(Application::APP_ID, 'secret' . $ext) | |
| 580 | + $urlGen->imagePath(Application::APP_ID, 'secret'.$ext) | |
| 581 | 581 | ); | 
| 582 | 582 | case DeprecatedCircle::CIRCLES_PUBLIC: | 
| 583 | 583 | return $urlGen->getAbsoluteURL( | 
| 584 | - $urlGen->imagePath(Application::APP_ID, 'black_circle' . $ext) | |
| 584 | + $urlGen->imagePath(Application::APP_ID, 'black_circle'.$ext) | |
| 585 | 585 | ); | 
| 586 | 586 | } | 
| 587 | 587 | |
| 588 | 588 | return $urlGen->getAbsoluteURL( | 
| 589 | - $urlGen->imagePath(Application::APP_ID, 'black_circle' . $ext) | |
| 589 | + $urlGen->imagePath(Application::APP_ID, 'black_circle'.$ext) | |
| 590 | 590 | ); | 
| 591 | 591 | } | 
| 592 | 592 | |
| @@ -467,7 +467,7 @@ discard block | ||
| 467 | 467 | } | 
| 468 | 468 | |
| 469 | 469 | /** | 
| 470 | - * @return string | |
| 470 | + * @return integer | |
| 471 | 471 | */ | 
| 472 | 472 |  	public function getType() { | 
| 473 | 473 | return $this->type; | 
| @@ -521,7 +521,7 @@ discard block | ||
| 521 | 521 | } | 
| 522 | 522 | |
| 523 | 523 | /** | 
| 524 | - * @return array | |
| 524 | + * @return DeprecatedMember[] | |
| 525 | 525 | */ | 
| 526 | 526 |  	public function getGroups() { | 
| 527 | 527 | return $this->groups; | 
| @@ -539,7 +539,7 @@ discard block | ||
| 539 | 539 | } | 
| 540 | 540 | |
| 541 | 541 | /** | 
| 542 | - * @return array | |
| 542 | + * @return FederatedLink[] | |
| 543 | 543 | */ | 
| 544 | 544 |  	public function getLinks() { | 
| 545 | 545 | return $this->links; | 
| @@ -575,7 +575,7 @@ discard block | ||
| 575 | 575 | // } | 
| 576 | 576 | |
| 577 | 577 | /** | 
| 578 | - * @param integer|string $type | |
| 578 | + * @param string $type | |
| 579 | 579 | * | 
| 580 | 580 | * @return integer | 
| 581 | 581 | */ | 
| @@ -178,7 +178,7 @@ | ||
| 178 | 178 | |
| 179 | 179 | /** | 
| 180 | 180 | * @param array $arr | 
| 181 | - * @param $key | |
| 181 | + * @param string $key | |
| 182 | 182 | * @param int $type | 
| 183 | 183 | * | 
| 184 | 184 | * @return null|DeprecatedMember | 
| @@ -292,7 +292,7 @@ | ||
| 292 | 292 | * @return int | 
| 293 | 293 | */ | 
| 294 | 294 |  	public static function convertTypeToConfig(int $type): int { | 
| 295 | -		switch($type) { | |
| 295 | +		switch ($type) { | |
| 296 | 296 | case DeprecatedCircle::CIRCLES_PERSONAL: | 
| 297 | 297 | return 2; | 
| 298 | 298 | case DeprecatedCircle::CIRCLES_SECRET: | 
| @@ -41,6 +41,9 @@ | ||
| 41 | 41 |  class DeprecatedMember extends BaseMember { | 
| 42 | 42 | |
| 43 | 43 | |
| 44 | + /** | |
| 45 | + * @param integer $circleType | |
| 46 | + */ | |
| 44 | 47 |  	public function inviteToCircle($circleType) { | 
| 45 | 48 | |
| 46 | 49 |  		if ($circleType === 0) { | 
| @@ -109,7 +109,7 @@ discard block | ||
| 109 | 109 | * @param string $circleUniqueId | 
| 110 | 110 | * @param string $groupId | 
| 111 | 111 | * | 
| 112 | - * @return array | |
| 112 | + * @return DeprecatedMember[] | |
| 113 | 113 | * @throws \Exception | 
| 114 | 114 | */ | 
| 115 | 115 |  	public function linkGroup($circleUniqueId, $groupId) { | 
| @@ -165,8 +165,8 @@ discard block | ||
| 165 | 165 | /** | 
| 166 | 166 | * Check if a fresh member can be generated (by linkGroup) | 
| 167 | 167 | * | 
| 168 | - * @param $circleId | |
| 169 | - * @param $groupId | |
| 168 | + * @param string $circleId | |
| 169 | + * @param string $groupId | |
| 170 | 170 | * | 
| 171 | 171 | * @return null|DeprecatedMember | 
| 172 | 172 | * @throws MemberAlreadyExistsException | 
| @@ -202,7 +202,7 @@ discard block | ||
| 202 | 202 | * @param string $groupId | 
| 203 | 203 | * @param int $level | 
| 204 | 204 | * | 
| 205 | - * @return array | |
| 205 | + * @return DeprecatedMember[] | |
| 206 | 206 | * @throws \Exception | 
| 207 | 207 | */ | 
| 208 | 208 |  	public function levelGroup($circleUniqueId, $groupId, $level) { | 
| @@ -243,7 +243,7 @@ discard block | ||
| 243 | 243 | /** | 
| 244 | 244 | * @param DeprecatedCircle $circle | 
| 245 | 245 | * @param DeprecatedMember $group | 
| 246 | - * @param $level | |
| 246 | + * @param integer $level | |
| 247 | 247 | * | 
| 248 | 248 | * @throws \Exception | 
| 249 | 249 | */ | 
| @@ -270,7 +270,7 @@ discard block | ||
| 270 | 270 | * @param string $circleUniqueId | 
| 271 | 271 | * @param string $groupId | 
| 272 | 272 | * | 
| 273 | - * @return array | |
| 273 | + * @return DeprecatedMember[] | |
| 274 | 274 | * @throws \Exception | 
| 275 | 275 | */ | 
| 276 | 276 |  	public function unlinkGroup($circleUniqueId, $groupId) { | 
| @@ -349,8 +349,8 @@ discard block | ||
| 349 | 349 | /** | 
| 350 | 350 | * Verify if a local account is valid. | 
| 351 | 351 | * | 
| 352 | - * @param $ident | |
| 353 | - * @param $type | |
| 352 | + * @param string $ident | |
| 353 | + * @param integer $type | |
| 354 | 354 | * | 
| 355 | 355 | * @param string $instance | 
| 356 | 356 | * | 
| @@ -401,8 +401,8 @@ discard block | ||
| 401 | 401 | /** | 
| 402 | 402 | * Verify if a contact exist in current user address books. | 
| 403 | 403 | * | 
| 404 | - * @param $ident | |
| 405 | - * @param $type | |
| 404 | + * @param string $ident | |
| 405 | + * @param integer $type | |
| 406 | 406 | * | 
| 407 | 407 | * @throws NoUserException | 
| 408 | 408 | * @throws EmailAccountInvalidFormatException | 
| @@ -494,8 +494,8 @@ discard block | ||
| 494 | 494 | * Will return any data of a user related to a circle (as a Member). User can be a 'non-member' | 
| 495 | 495 | * Viewer needs to be at least Member of the Circle | 
| 496 | 496 | * | 
| 497 | - * @param $circleId | |
| 498 | - * @param $userId | |
| 497 | + * @param string $circleId | |
| 498 | + * @param string $userId | |
| 499 | 499 | * @param $type | 
| 500 | 500 | * @param bool $forceAll | 
| 501 | 501 | * | 
| @@ -551,7 +551,7 @@ discard block | ||
| 551 | 551 | * @param int $level | 
| 552 | 552 | * @param bool $force | 
| 553 | 553 | * | 
| 554 | - * @return array | |
| 554 | + * @return DeprecatedMember[] | |
| 555 | 555 | * @throws CircleDoesNotExistException | 
| 556 | 556 | * @throws CircleTypeNotValidException | 
| 557 | 557 | * @throws ConfigNoCircleAvailableException | 
| @@ -164,7 +164,7 @@ discard block | ||
| 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(), DeprecatedMember::TYPE_USER); | 
| 169 | 169 | $this->manageDeprecatedCircles($davCard->getAddressBookId()); | 
| 170 | 170 | $this->manageDeprecatedMembers($davCard); | 
| @@ -205,7 +205,7 @@ discard block | ||
| 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 | ||
| 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 | ||
| 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 | ||
| 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 | ||
| 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 | ||
| 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 | ||
| 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 | ||
| 425 | 425 | |
| 426 | 426 | $user = $this->userManager->get($davCard->getOwner()); | 
| 427 | 427 | $circle = new DeprecatedCircle( | 
| 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 | ||
| 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 | ||
| 442 | 442 | $owner->setStatus(DeprecatedMember::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 | ||
| 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 | ||
| 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 | ||
| 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 | ||
| 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 | ||
| 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 | ||
| 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 | ||
| 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 | ||
| 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 | ||
| 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 | ||
| 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(DeprecatedCircle $circle) { | 
| @@ -652,7 +652,7 @@ discard block | ||
| 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 | ||
| 667 | 667 | */ | 
| 668 | 668 |  	public function getDavCardFromMember(DeprecatedMember $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 | ||
| 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(); | 
| @@ -148,7 +148,7 @@ | ||
| 148 | 148 | continue; | 
| 149 | 149 | } | 
| 150 | 150 | |
| 151 | - $level = (int) $row['role'] === 1 ? DeprecatedMember::LEVEL_OWNER : DeprecatedMember::LEVEL_MEMBER; | |
| 151 | + $level = (int)$row['role'] === 1 ? DeprecatedMember::LEVEL_OWNER : DeprecatedMember::LEVEL_MEMBER; | |
| 152 | 152 | |
| 153 | 153 |  			if ($level === DeprecatedMember::LEVEL_OWNER) { | 
| 154 | 154 |  				if (isset($this->circleHasAdmin[$this->circlesById[$row['group_id']]])) { |