@@ -194,7 +194,7 @@ |
||
| 194 | 194 | throw new OCSException('works only from local instance', 404); |
| 195 | 195 | } |
| 196 | 196 | |
| 197 | - $userId = $currentUser->getUserId() . '/' . $userId; |
|
| 197 | + $userId = $currentUser->getUserId().'/'.$userId; |
|
| 198 | 198 | } |
| 199 | 199 | |
| 200 | 200 | $federatedUser = $this->federatedUserService->generateFederatedUser($userId, $type); |
@@ -577,24 +577,24 @@ |
||
| 577 | 577 | switch ($type) { |
| 578 | 578 | case DeprecatedCircle::CIRCLES_PERSONAL: |
| 579 | 579 | return $urlGen->getAbsoluteURL( |
| 580 | - $urlGen->imagePath(Application::APP_ID, 'personal' . $ext) |
|
| 580 | + $urlGen->imagePath(Application::APP_ID, 'personal'.$ext) |
|
| 581 | 581 | ); |
| 582 | 582 | case DeprecatedCircle::CIRCLES_CLOSED: |
| 583 | 583 | return $urlGen->getAbsoluteURL( |
| 584 | - $urlGen->imagePath(Application::APP_ID, 'closed' . $ext) |
|
| 584 | + $urlGen->imagePath(Application::APP_ID, 'closed'.$ext) |
|
| 585 | 585 | ); |
| 586 | 586 | case DeprecatedCircle::CIRCLES_SECRET: |
| 587 | 587 | return $urlGen->getAbsoluteURL( |
| 588 | - $urlGen->imagePath(Application::APP_ID, 'secret' . $ext) |
|
| 588 | + $urlGen->imagePath(Application::APP_ID, 'secret'.$ext) |
|
| 589 | 589 | ); |
| 590 | 590 | case DeprecatedCircle::CIRCLES_PUBLIC: |
| 591 | 591 | return $urlGen->getAbsoluteURL( |
| 592 | - $urlGen->imagePath(Application::APP_ID, 'circles' . $ext) |
|
| 592 | + $urlGen->imagePath(Application::APP_ID, 'circles'.$ext) |
|
| 593 | 593 | ); |
| 594 | 594 | } |
| 595 | 595 | |
| 596 | 596 | return $urlGen->getAbsoluteURL( |
| 597 | - $urlGen->imagePath(Application::APP_ID, 'circles' . $ext) |
|
| 597 | + $urlGen->imagePath(Application::APP_ID, 'circles'.$ext) |
|
| 598 | 598 | ); |
| 599 | 599 | } |
| 600 | 600 | |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | } catch (FederatedItemException $e) { |
| 156 | 156 | if ($input->getOption('status-code')) { |
| 157 | 157 | throw new FederatedItemException( |
| 158 | - ' [' . get_class($e) . ', ' . $e->getStatus() . ']' . "\n" . $e->getMessage() |
|
| 158 | + ' ['.get_class($e).', '.$e->getStatus().']'."\n".$e->getMessage() |
|
| 159 | 159 | ); |
| 160 | 160 | } |
| 161 | 161 | |
@@ -189,8 +189,8 @@ discard block |
||
| 189 | 189 | $value = array_search(strtoupper($item), $valid); |
| 190 | 190 | if (!$value) { |
| 191 | 191 | throw new InvalidArgumentException( |
| 192 | - 'Invalid config \'' . $item . '\'. Available values: ' |
|
| 193 | - . implode(', ', array_values($valid)) . '. ' |
|
| 192 | + 'Invalid config \''.$item.'\'. Available values: ' |
|
| 193 | + . implode(', ', array_values($valid)).'. ' |
|
| 194 | 194 | . 'To disable a config, start the value with an underscore' |
| 195 | 195 | ); |
| 196 | 196 | } |
@@ -219,7 +219,7 @@ discard block |
||
| 219 | 219 | |
| 220 | 220 | array_walk( |
| 221 | 221 | $listing, |
| 222 | - function (string &$v): void { |
|
| 222 | + function(string &$v): void { |
|
| 223 | 223 | [, $long] = explode('|', $v); |
| 224 | 224 | $v = strtoupper(str_replace(' ', '', $long)); |
| 225 | 225 | } |
@@ -219,7 +219,7 @@ discard block |
||
| 219 | 219 | $recipient = $share->getInitiator(); |
| 220 | 220 | $sharedTo = $recipient->getDisplayName(); |
| 221 | 221 | if (!$this->configService->isLocalInstance($recipient->getInstance())) { |
| 222 | - $sharedTo .= '@' . $recipient->getInstance(); |
|
| 222 | + $sharedTo .= '@'.$recipient->getInstance(); |
|
| 223 | 223 | } |
| 224 | 224 | } |
| 225 | 225 | $circle = $share->getCircle(); |
@@ -229,15 +229,15 @@ discard block |
||
| 229 | 229 | $share->getShareOwner(), |
| 230 | 230 | $share->getFileTarget(), |
| 231 | 231 | $share->getSharedBy(), |
| 232 | - $circle->getDisplayName() . ' (' . $share->getSharedWith() |
|
| 233 | - . ', ' . Circle::$DEF_SOURCE[$circle->getSource()] . ')' |
|
| 232 | + $circle->getDisplayName().' ('.$share->getSharedWith() |
|
| 233 | + . ', '.Circle::$DEF_SOURCE[$circle->getSource()].')' |
|
| 234 | 234 | ]; |
| 235 | 235 | |
| 236 | 236 | if (!$filterRecipient) { |
| 237 | 237 | $row = array_merge( |
| 238 | 238 | $row, [ |
| 239 | - $sharedTo . ' (' . $recipient->getSingleId() . ', ' |
|
| 240 | - . Circle::$DEF_SOURCE[$recipient->getBasedOn()->getSource()] . ')', |
|
| 239 | + $sharedTo.' ('.$recipient->getSingleId().', ' |
|
| 240 | + . Circle::$DEF_SOURCE[$recipient->getBasedOn()->getSource()].')', |
|
| 241 | 241 | (($share->getChildId() > 0) ? $share->getChildFileTarget( |
| 242 | 242 | ) : $share->getFileTarget()), |
| 243 | 243 | ] |
@@ -137,7 +137,7 @@ discard block |
||
| 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 |
||
| 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 | } |
@@ -336,8 +336,8 @@ discard block |
||
| 336 | 336 | return [ |
| 337 | 337 | 'type' => 'circle', |
| 338 | 338 | 'id' => $link->getUniqueId(), |
| 339 | - 'name' => $link->getToken() . '@' . $link->getAddress(), |
|
| 340 | - '_parsed' => $link->getToken() . '@' . $link->getAddress() |
|
| 339 | + 'name' => $link->getToken().'@'.$link->getAddress(), |
|
| 340 | + '_parsed' => $link->getToken().'@'.$link->getAddress() |
|
| 341 | 341 | ]; |
| 342 | 342 | } |
| 343 | 343 | |
@@ -245,16 +245,16 @@ discard block |
||
| 245 | 245 | try { |
| 246 | 246 | $test = new ReflectionClass($class); |
| 247 | 247 | } catch (ReflectionException $e) { |
| 248 | - throw new FederatedEventException('ReflectionException with ' . $class . ': ' . $e->getMessage()); |
|
| 248 | + throw new FederatedEventException('ReflectionException with '.$class.': '.$e->getMessage()); |
|
| 249 | 249 | } |
| 250 | 250 | |
| 251 | 251 | if (!in_array(IFederatedItem::class, $test->getInterfaceNames())) { |
| 252 | - throw new FederatedEventException($class . ' does not implements IFederatedItem'); |
|
| 252 | + throw new FederatedEventException($class.' does not implements IFederatedItem'); |
|
| 253 | 253 | } |
| 254 | 254 | |
| 255 | 255 | $item = OC::$server->get($class); |
| 256 | 256 | if (!($item instanceof IFederatedItem)) { |
| 257 | - throw new FederatedEventException($class . ' not an IFederatedItem'); |
|
| 257 | + throw new FederatedEventException($class.' not an IFederatedItem'); |
|
| 258 | 258 | } |
| 259 | 259 | |
| 260 | 260 | if ($item instanceof IFederatedItemHighSeverity) { |
@@ -450,7 +450,7 @@ discard block |
||
| 450 | 450 | $knownInstances = $this->memberRequest->getMemberInstances($circle->getSingleId()); |
| 451 | 451 | $instances = array_filter( |
| 452 | 452 | array_map( |
| 453 | - function (RemoteInstance $instance) use ($knownInstances) { |
|
| 453 | + function(RemoteInstance $instance) use ($knownInstances) { |
|
| 454 | 454 | if (!in_array($instance->getInstance(), $knownInstances)) { |
| 455 | 455 | return null; |
| 456 | 456 | } |
@@ -465,7 +465,7 @@ discard block |
||
| 465 | 465 | if ($event->hasMember() |
| 466 | 466 | && !$this->configService->isLocalInstance($event->getMember()->getInstance())) { |
| 467 | 467 | $currentInstances = array_map( |
| 468 | - function (RemoteInstance $instance): string { |
|
| 468 | + function(RemoteInstance $instance): string { |
|
| 469 | 469 | return $instance->getInstance(); |
| 470 | 470 | }, $instances |
| 471 | 471 | ); |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | public function onDeleteCard(GenericEvent $event) { |
| 163 | 163 | $davCard = $this->generateDavCard($event, true); |
| 164 | 164 | |
| 165 | - $this->miscService->log('Deleting Card: ' . json_encode($davCard), 1); |
|
| 165 | + $this->miscService->log('Deleting Card: '.json_encode($davCard), 1); |
|
| 166 | 166 | $this->membersRequest->removeMembersByContactId($davCard->getUniqueId(), DeprecatedMember::TYPE_USER); |
| 167 | 167 | $this->manageDeprecatedCircles($davCard->getAddressBookId()); |
| 168 | 168 | $this->manageDeprecatedMembers($davCard); |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | */ |
| 204 | 204 | private function generateDavCardFromCard(int $bookId, array $card): DavCard { |
| 205 | 205 | $this->miscService->log( |
| 206 | - 'generating DavCard Model from book=' . $bookId . ' from ' . json_encode($card), 0 |
|
| 206 | + 'generating DavCard Model from book='.$bookId.' from '.json_encode($card), 0 |
|
| 207 | 207 | ); |
| 208 | 208 | |
| 209 | 209 | $davCard = new DavCard(); |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | $davCard->setOwner($this->getOwnerFromAddressBook($bookId)); |
| 214 | 214 | $davCard->importFromDav($card['carddata']); |
| 215 | 215 | |
| 216 | - $this->miscService->log('generated DavCard Model: ' . json_encode($davCard), 0); |
|
| 216 | + $this->miscService->log('generated DavCard Model: '.json_encode($davCard), 0); |
|
| 217 | 217 | |
| 218 | 218 | return $davCard; |
| 219 | 219 | } |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | * |
| 225 | 225 | */ |
| 226 | 226 | private function manageDavCard(DavCard $davCard) { |
| 227 | - $this->miscService->log('Updating Card: ' . json_encode($davCard), 1); |
|
| 227 | + $this->miscService->log('Updating Card: '.json_encode($davCard), 1); |
|
| 228 | 228 | $this->manageCircles($davCard); |
| 229 | 229 | $this->manageContact($davCard); |
| 230 | 230 | } |
@@ -257,24 +257,24 @@ discard block |
||
| 257 | 257 | */ |
| 258 | 258 | private function manageDeprecatedMembers(DavCard $davCard) { |
| 259 | 259 | $this->miscService->log( |
| 260 | - 'Managing deprecated circles memberships from DavCard Model: ' . json_encode($davCard), 0 |
|
| 260 | + 'Managing deprecated circles memberships from DavCard Model: '.json_encode($davCard), 0 |
|
| 261 | 261 | ); |
| 262 | 262 | |
| 263 | 263 | $circles = array_map( |
| 264 | - function (DeprecatedCircle $circle) { |
|
| 264 | + function(DeprecatedCircle $circle) { |
|
| 265 | 265 | return $circle->getUniqueId(); |
| 266 | 266 | }, $davCard->getCircles() |
| 267 | 267 | ); |
| 268 | 268 | |
| 269 | 269 | $members = $this->membersRequest->getMembersByContactId($davCard->getUniqueId()); |
| 270 | 270 | $this->miscService->log( |
| 271 | - 'Found ' . sizeof($members) . ' memberships with contactId=' . $davCard->getUniqueId(), 0 |
|
| 271 | + 'Found '.sizeof($members).' memberships with contactId='.$davCard->getUniqueId(), 0 |
|
| 272 | 272 | ); |
| 273 | 273 | |
| 274 | 274 | foreach ($members as $member) { |
| 275 | 275 | if (!in_array($member->getCircleId(), $circles)) { |
| 276 | 276 | $this->miscService->log( |
| 277 | - 'Removing membership ' . $member->getMemberId() . ' from ' . $member->getCircleId(), 0 |
|
| 277 | + 'Removing membership '.$member->getMemberId().' from '.$member->getCircleId(), 0 |
|
| 278 | 278 | ); |
| 279 | 279 | $this->membersRequest->removeMember($member); |
| 280 | 280 | } |
@@ -354,7 +354,7 @@ discard block |
||
| 354 | 354 | } |
| 355 | 355 | } |
| 356 | 356 | |
| 357 | - $davCard->setUserId($davCard->getOwner() . ':' . $davCard->getContactId()); |
|
| 357 | + $davCard->setUserId($davCard->getOwner().':'.$davCard->getContactId()); |
|
| 358 | 358 | |
| 359 | 359 | return DavCard::TYPE_CONTACT; |
| 360 | 360 | } |
@@ -393,13 +393,13 @@ discard block |
||
| 393 | 393 | private function manageCircles(DavCard $davCard) { |
| 394 | 394 | $fromCard = $davCard->getGroups(); |
| 395 | 395 | $current = array_map( |
| 396 | - function (DeprecatedCircle $circle) { |
|
| 396 | + function(DeprecatedCircle $circle) { |
|
| 397 | 397 | return $circle->getContactGroupName(); |
| 398 | 398 | }, $this->getCirclesFromBook($davCard->getAddressBookId()) |
| 399 | 399 | ); |
| 400 | 400 | |
| 401 | 401 | $this->miscService->log( |
| 402 | - 'manage Circles from DavCard: ' . json_encode($fromCard) . ' - current: ' . json_encode($current) |
|
| 402 | + 'manage Circles from DavCard: '.json_encode($fromCard).' - current: '.json_encode($current) |
|
| 403 | 403 | ); |
| 404 | 404 | |
| 405 | 405 | $this->manageNewCircles($davCard, $fromCard, $current); |
@@ -422,7 +422,7 @@ discard block |
||
| 422 | 422 | |
| 423 | 423 | $user = $this->userManager->get($davCard->getOwner()); |
| 424 | 424 | $circle = new DeprecatedCircle( |
| 425 | - $this->configService->contactsBackendType(), $group . ' - ' . $user->getDisplayName() |
|
| 425 | + $this->configService->contactsBackendType(), $group.' - '.$user->getDisplayName() |
|
| 426 | 426 | ); |
| 427 | 427 | $circle->setAltName($group); |
| 428 | 428 | $circle->generateUniqueId(); |
@@ -430,7 +430,7 @@ discard block |
||
| 430 | 430 | $circle->setContactGroupName($group); |
| 431 | 431 | |
| 432 | 432 | $this->miscService->log( |
| 433 | - 'creating new Circle: ' . json_encode($circle) . ', with owner=' . $davCard->getOwner(), 0 |
|
| 433 | + 'creating new Circle: '.json_encode($circle).', with owner='.$davCard->getOwner(), 0 |
|
| 434 | 434 | ); |
| 435 | 435 | try { |
| 436 | 436 | $this->circlesRequest->createCircle($circle); |
@@ -439,7 +439,7 @@ discard block |
||
| 439 | 439 | $owner->setStatus(DeprecatedMember::STATUS_MEMBER); |
| 440 | 440 | $this->membersService->updateCachedName($owner); |
| 441 | 441 | |
| 442 | - $this->miscService->log('creating new Member: ' . json_encode($owner), 0); |
|
| 442 | + $this->miscService->log('creating new Member: '.json_encode($owner), 0); |
|
| 443 | 443 | try { |
| 444 | 444 | $this->membersRequest->createMember($owner); |
| 445 | 445 | } catch (MemberAlreadyExistsException $e) { |
@@ -454,7 +454,7 @@ discard block |
||
| 454 | 454 | * @param DavCard $davCard |
| 455 | 455 | */ |
| 456 | 456 | private function assignCirclesToCard(DavCard $davCard) { |
| 457 | - $this->miscService->log('assigning Circles to DavCard Model: ' . json_encode($davCard), 0); |
|
| 457 | + $this->miscService->log('assigning Circles to DavCard Model: '.json_encode($davCard), 0); |
|
| 458 | 458 | foreach ($davCard->getGroups() as $group) { |
| 459 | 459 | try { |
| 460 | 460 | $davCard->addCircle( |
@@ -464,7 +464,7 @@ discard block |
||
| 464 | 464 | } |
| 465 | 465 | } |
| 466 | 466 | |
| 467 | - $this->miscService->log('assigned Circles to DavCard Model: ' . json_encode($davCard), 0); |
|
| 467 | + $this->miscService->log('assigned Circles to DavCard Model: '.json_encode($davCard), 0); |
|
| 468 | 468 | } |
| 469 | 469 | |
| 470 | 470 | |
@@ -509,12 +509,12 @@ discard block |
||
| 509 | 509 | * @return string |
| 510 | 510 | */ |
| 511 | 511 | public function getOwnerFromAddressBook(int $bookId): string { |
| 512 | - $this->miscService->log('Retrieving Owner from book:' . $bookId, 0); |
|
| 512 | + $this->miscService->log('Retrieving Owner from book:'.$bookId, 0); |
|
| 513 | 513 | $data = $this->cardDavBackend->getAddressBookById($bookId); |
| 514 | 514 | |
| 515 | 515 | // let's assume the format is principals/users/OWNER |
| 516 | 516 | $owner = substr($data['principaluri'], 17); |
| 517 | - $this->miscService->log('Retrieved Owner:' . $owner, 0); |
|
| 517 | + $this->miscService->log('Retrieved Owner:'.$owner, 0); |
|
| 518 | 518 | |
| 519 | 519 | return $owner; |
| 520 | 520 | } |
@@ -531,12 +531,12 @@ discard block |
||
| 531 | 531 | $this->manageDeprecatedContacts(); |
| 532 | 532 | $this->manageDeprecatedCircles(); |
| 533 | 533 | $users = $this->userManager->search(''); |
| 534 | - $this->miscService->log('initiating migration for ' . sizeof($users) . ' users', 0); |
|
| 534 | + $this->miscService->log('initiating migration for '.sizeof($users).' users', 0); |
|
| 535 | 535 | foreach ($users as $user) { |
| 536 | - $this->miscService->log('retrieving books for user=' . $user->getUID(), 0); |
|
| 537 | - $books = $this->cardDavBackend->getAddressBooksForUser('principals/users/' . $user->getUID()); |
|
| 536 | + $this->miscService->log('retrieving books for user='.$user->getUID(), 0); |
|
| 537 | + $books = $this->cardDavBackend->getAddressBooksForUser('principals/users/'.$user->getUID()); |
|
| 538 | 538 | |
| 539 | - $this->miscService->log('initiating migration for user=' . $user->getUID(), 0); |
|
| 539 | + $this->miscService->log('initiating migration for user='.$user->getUID(), 0); |
|
| 540 | 540 | foreach ($books as $book) { |
| 541 | 541 | $this->migrateBook($book['id']); |
| 542 | 542 | } |
@@ -549,16 +549,16 @@ discard block |
||
| 549 | 549 | private function manageDeprecatedContacts() { |
| 550 | 550 | $contacts = $this->membersRequest->getMembersByContactId(); |
| 551 | 551 | $this->miscService->log( |
| 552 | - 'Managing Deprecated Contacts, checking ' . sizeof($contacts) . ' known contacts in database', 0 |
|
| 552 | + 'Managing Deprecated Contacts, checking '.sizeof($contacts).' known contacts in database', 0 |
|
| 553 | 553 | ); |
| 554 | 554 | |
| 555 | 555 | foreach ($contacts as $contact) { |
| 556 | 556 | try { |
| 557 | 557 | $this->getDavCardFromMember($contact); |
| 558 | - $this->miscService->log('Contact is not deprecated: ' . json_encode($contact)); |
|
| 558 | + $this->miscService->log('Contact is not deprecated: '.json_encode($contact)); |
|
| 559 | 559 | } catch (MemberDoesNotExistException $e) { |
| 560 | 560 | $this->miscService->log( |
| 561 | - 'Contact is deprecated and will be removed: ' . json_encode($contact) |
|
| 561 | + 'Contact is deprecated and will be removed: '.json_encode($contact) |
|
| 562 | 562 | ); |
| 563 | 563 | $this->membersRequest->removeMember($contact); |
| 564 | 564 | } |
@@ -573,15 +573,15 @@ discard block |
||
| 573 | 573 | */ |
| 574 | 574 | private function manageDeprecatedCircles(int $bookId = 0) { |
| 575 | 575 | $knownBooks = [$bookId]; |
| 576 | - $this->miscService->log('Managing Deprecated Circles, using bookId: ' . $bookId, 0); |
|
| 576 | + $this->miscService->log('Managing Deprecated Circles, using bookId: '.$bookId, 0); |
|
| 577 | 577 | |
| 578 | 578 | if ($bookId > 0) { |
| 579 | 579 | $knownBooks = []; |
| 580 | 580 | $contacts = $this->membersRequest->getMembersByContactId(); |
| 581 | - $this->miscService->log(sizeof($contacts) . ' known members as contacts in Circles DB', 0); |
|
| 581 | + $this->miscService->log(sizeof($contacts).' known members as contacts in Circles DB', 0); |
|
| 582 | 582 | |
| 583 | 583 | foreach ($contacts as $contact) { |
| 584 | - [$bookId,] = explode('/', $contact->getContactId(), 2); |
|
| 584 | + [$bookId, ] = explode('/', $contact->getContactId(), 2); |
|
| 585 | 585 | if (in_array($bookId, $knownBooks)) { |
| 586 | 586 | continue; |
| 587 | 587 | } |
@@ -590,17 +590,17 @@ discard block |
||
| 590 | 590 | } |
| 591 | 591 | } |
| 592 | 592 | |
| 593 | - $this->miscService->log('Known books: ' . json_encode($knownBooks), 0); |
|
| 593 | + $this->miscService->log('Known books: '.json_encode($knownBooks), 0); |
|
| 594 | 594 | foreach ($knownBooks as $bookId) { |
| 595 | - $this->miscService->log('retrieving local Circles data for bookId=' . $bookId, 0); |
|
| 595 | + $this->miscService->log('retrieving local Circles data for bookId='.$bookId, 0); |
|
| 596 | 596 | $circles = $this->circlesRequest->getFromContactBook($bookId); |
| 597 | 597 | $this->miscService->log( |
| 598 | - 'Known circles for bookId=' . $bookId . ': ' . json_encode($circles), 0 |
|
| 598 | + 'Known circles for bookId='.$bookId.': '.json_encode($circles), 0 |
|
| 599 | 599 | ); |
| 600 | 600 | |
| 601 | 601 | $fromBook = $this->getExistingCirclesFromBook($bookId); |
| 602 | 602 | $this->miscService->log( |
| 603 | - 'Generated circles from bookId=' . $bookId . ': ' . json_encode($fromBook), 0 |
|
| 603 | + 'Generated circles from bookId='.$bookId.': '.json_encode($fromBook), 0 |
|
| 604 | 604 | ); |
| 605 | 605 | |
| 606 | 606 | foreach ($circles as $circle) { |
@@ -609,7 +609,7 @@ discard block |
||
| 609 | 609 | } |
| 610 | 610 | |
| 611 | 611 | $this->miscService->log( |
| 612 | - $circle->getUniqueId() . ' is a deprecated Circle and will be destroyed', 0 |
|
| 612 | + $circle->getUniqueId().' is a deprecated Circle and will be destroyed', 0 |
|
| 613 | 613 | ); |
| 614 | 614 | |
| 615 | 615 | $this->membersRequest->removeAllFromCircle($circle->getUniqueId()); |
@@ -631,7 +631,7 @@ discard block |
||
| 631 | 631 | $cards = $this->cardDavBackend->getCards($bookId); |
| 632 | 632 | |
| 633 | 633 | $this->miscService->log( |
| 634 | - 'retrieving existing circles from bookId=' . $bookId . ' in ' . sizeof($cards) . ' cards', 0 |
|
| 634 | + 'retrieving existing circles from bookId='.$bookId.' in '.sizeof($cards).' cards', 0 |
|
| 635 | 635 | ); |
| 636 | 636 | foreach ($cards as $card) { |
| 637 | 637 | $davCard = $this->generateDavCardFromCard($bookId, $card); |
@@ -639,17 +639,17 @@ discard block |
||
| 639 | 639 | $circles = array_merge($circles, $davCard->getCircles()); |
| 640 | 640 | } |
| 641 | 641 | |
| 642 | - $this->miscService->log('Found ' . sizeof($circles) . ' Circles from book=' . $bookId, 0); |
|
| 642 | + $this->miscService->log('Found '.sizeof($circles).' Circles from book='.$bookId, 0); |
|
| 643 | 643 | $existing = array_unique( |
| 644 | 644 | array_map( |
| 645 | - function (DeprecatedCircle $circle) { |
|
| 645 | + function(DeprecatedCircle $circle) { |
|
| 646 | 646 | return $circle->getContactGroupName(); |
| 647 | 647 | }, $circles |
| 648 | 648 | ) |
| 649 | 649 | ); |
| 650 | 650 | |
| 651 | 651 | $this->miscService->log( |
| 652 | - 'retrieved existing circles from book=' . $bookId . ': ' . json_encode($existing), 0 |
|
| 652 | + 'retrieved existing circles from book='.$bookId.': '.json_encode($existing), 0 |
|
| 653 | 653 | ); |
| 654 | 654 | |
| 655 | 655 | return $existing; |
@@ -664,14 +664,14 @@ discard block |
||
| 664 | 664 | */ |
| 665 | 665 | public function getDavCardFromMember(DeprecatedMember $contact): DavCard { |
| 666 | 666 | [$bookId, $cardUri] = explode('/', $contact->getContactId(), 2); |
| 667 | - $this->miscService->log('Retrieving DavCard from book:' . $bookId . ', uri:' . $cardUri, 0); |
|
| 667 | + $this->miscService->log('Retrieving DavCard from book:'.$bookId.', uri:'.$cardUri, 0); |
|
| 668 | 668 | |
| 669 | 669 | $cards = $this->cardDavBackend->getCards($bookId); |
| 670 | - $this->miscService->log('Book contains ' . sizeof($cards) . ' cards', 0); |
|
| 670 | + $this->miscService->log('Book contains '.sizeof($cards).' cards', 0); |
|
| 671 | 671 | foreach ($cards as $card) { |
| 672 | 672 | if ($card['uri'] === $cardUri) { |
| 673 | 673 | $davCard = $this->generateDavCardFromCard($bookId, $card); |
| 674 | - $this->miscService->log('Retrieved DavCard: ' . json_encode($card)); |
|
| 674 | + $this->miscService->log('Retrieved DavCard: '.json_encode($card)); |
|
| 675 | 675 | |
| 676 | 676 | return $davCard; |
| 677 | 677 | } |
@@ -689,11 +689,11 @@ discard block |
||
| 689 | 689 | return; |
| 690 | 690 | } |
| 691 | 691 | |
| 692 | - $this->miscService->log('migrating book: ' . $bookId, 0); |
|
| 692 | + $this->miscService->log('migrating book: '.$bookId, 0); |
|
| 693 | 693 | $owner = $this->getOwnerFromAddressBook($bookId); |
| 694 | 694 | |
| 695 | 695 | $cards = $this->cardDavBackend->getCards($bookId); |
| 696 | - $this->miscService->log('found ' . sizeof($cards) . 'cards from book=' . $bookId, 0); |
|
| 696 | + $this->miscService->log('found '.sizeof($cards).'cards from book='.$bookId, 0); |
|
| 697 | 697 | |
| 698 | 698 | foreach ($cards as $card) { |
| 699 | 699 | $davCard = new DavCard(); |
@@ -251,7 +251,7 @@ |
||
| 251 | 251 | } |
| 252 | 252 | |
| 253 | 253 | $members = array_map( |
| 254 | - function (FederatedUser $federatedUser) use ($patron) { |
|
| 254 | + function(FederatedUser $federatedUser) use ($patron) { |
|
| 255 | 255 | $member = new Member(); |
| 256 | 256 | $member->importFromIFederatedUser($federatedUser); |
| 257 | 257 | $member->setInvitedBy($patron); |
@@ -153,7 +153,7 @@ |
||
| 153 | 153 | $gs = $this->globalScaleService->getGlobalScaleEvent($event); |
| 154 | 154 | $gs->manage($event); |
| 155 | 155 | } catch (Exception $e) { |
| 156 | - $this->miscService->log('issue onNewEvent: ' . json_encode($event) . ' - ' . $e->getMessage()); |
|
| 156 | + $this->miscService->log('issue onNewEvent: '.json_encode($event).' - '.$e->getMessage()); |
|
| 157 | 157 | } |
| 158 | 158 | } |
| 159 | 159 | } |