@@ -155,7 +155,7 @@ |
||
155 | 155 | $gs = $this->globalScaleService->getGlobalScaleEvent($event); |
156 | 156 | $gs->manage($event); |
157 | 157 | } catch (Exception $e) { |
158 | - $this->miscService->log('issue onNewEvent: ' . json_encode($event) . ' - ' . $e->getMessage()); |
|
158 | + $this->miscService->log('issue onNewEvent: '.json_encode($event).' - '.$e->getMessage()); |
|
159 | 159 | } |
160 | 160 | } |
161 | 161 |
@@ -119,9 +119,9 @@ discard block |
||
119 | 119 | $tCards = $tBooks = 0; |
120 | 120 | $knownBooks = []; |
121 | 121 | foreach ($users as $user) { |
122 | - $books = $this->cardDavBackend->getAddressBooksForUser('principals/users/' . $user->getUID()); |
|
122 | + $books = $this->cardDavBackend->getAddressBooksForUser('principals/users/'.$user->getUID()); |
|
123 | 123 | $output->writeln( |
124 | - '- User <info>' . $user->getUID() . '</info> have ' . sizeof($books) . ' address books:' |
|
124 | + '- User <info>'.$user->getUID().'</info> have '.sizeof($books).' address books:' |
|
125 | 125 | ); |
126 | 126 | |
127 | 127 | $tBooks += sizeof($books); |
@@ -137,11 +137,11 @@ discard block |
||
137 | 137 | |
138 | 138 | $shared = ''; |
139 | 139 | if ($owner !== $user->getUID()) { |
140 | - $shared = ' (shared by <info>' . $owner . '</info>)'; |
|
140 | + $shared = ' (shared by <info>'.$owner.'</info>)'; |
|
141 | 141 | } |
142 | 142 | |
143 | 143 | $output->writeln( |
144 | - ' <comment>*</comment> book #' . $bookId . $shared . ' contains ' |
|
144 | + ' <comment>*</comment> book #'.$bookId.$shared.' contains ' |
|
145 | 145 | . sizeof($cards) |
146 | 146 | . ' entries' |
147 | 147 | ); |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | } |
152 | 152 | |
153 | 153 | $output->writeln(''); |
154 | - $output->writeln('with a total of ' . $tBooks . ' address books and ' . $tCards . ' contact entries'); |
|
154 | + $output->writeln('with a total of '.$tBooks.' address books and '.$tCards.' contact entries'); |
|
155 | 155 | } |
156 | 156 | |
157 | 157 |
@@ -83,7 +83,7 @@ |
||
83 | 83 | |
84 | 84 | |
85 | 85 | /** |
86 | - * @param $search |
|
86 | + * @param string $search |
|
87 | 87 | * |
88 | 88 | * @return array |
89 | 89 | */ |
@@ -114,7 +114,7 @@ |
||
114 | 114 | * limit the request to the children of a share |
115 | 115 | * |
116 | 116 | * @param IQueryBuilder $qb |
117 | - * @param $userId |
|
117 | + * @param string $userId |
|
118 | 118 | * @param int $parentId |
119 | 119 | */ |
120 | 120 | protected function limitToShareChildren(IQueryBuilder $qb, $userId, $parentId = -1) { |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | $pf = ($qb->getType() === QueryBuilder::SELECT) ? 's.' : ''; |
78 | 78 | $qb->andWhere( |
79 | 79 | $expr->in( |
80 | - $pf . 'share_with', |
|
80 | + $pf.'share_with', |
|
81 | 81 | $qb->createNamedParameter($circleUniqueIds, IQueryBuilder::PARAM_STR_ARRAY) |
82 | 82 | ) |
83 | 83 | ); |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | $expr = $qb->expr(); |
95 | 95 | $pf = ($qb->getType() === QueryBuilder::SELECT) ? 's.' : ''; |
96 | 96 | |
97 | - $qb->andWhere($expr->eq($pf . 'id', $qb->createNamedParameter($shareId))); |
|
97 | + $qb->andWhere($expr->eq($pf.'id', $qb->createNamedParameter($shareId))); |
|
98 | 98 | } |
99 | 99 | |
100 | 100 | |
@@ -142,8 +142,8 @@ discard block |
||
142 | 142 | |
143 | 143 | $qb->andWhere( |
144 | 144 | $expr->orX( |
145 | - $expr->eq($pf . 'parent', $qb->createNamedParameter($circleId)), |
|
146 | - $expr->eq($pf . 'id', $qb->createNamedParameter($circleId)) |
|
145 | + $expr->eq($pf.'parent', $qb->createNamedParameter($circleId)), |
|
146 | + $expr->eq($pf.'id', $qb->createNamedParameter($circleId)) |
|
147 | 147 | ) |
148 | 148 | ); |
149 | 149 | } |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | $pf = ($qb->getType() === QueryBuilder::SELECT) ? 's.' : ''; |
166 | 166 | $qb->andWhere( |
167 | 167 | $expr->in( |
168 | - $pf . 'file_source', |
|
168 | + $pf.'file_source', |
|
169 | 169 | $qb->createNamedParameter($files, IQueryBuilder::PARAM_INT_ARRAY) |
170 | 170 | ) |
171 | 171 | ); |
@@ -198,12 +198,12 @@ discard block |
||
198 | 198 | $pf = ($qb->getType() === QueryBuilder::SELECT) ? 's.' : ''; |
199 | 199 | |
200 | 200 | if ($reShares === false) { |
201 | - $qb->andWhere($expr->eq($pf . 'uid_initiator', $qb->createNamedParameter($userId))); |
|
201 | + $qb->andWhere($expr->eq($pf.'uid_initiator', $qb->createNamedParameter($userId))); |
|
202 | 202 | } else { |
203 | 203 | $qb->andWhere( |
204 | 204 | $expr->orX( |
205 | - $expr->eq($pf . 'uid_owner', $qb->createNamedParameter($userId)), |
|
206 | - $expr->eq($pf . 'uid_initiator', $qb->createNamedParameter($userId)) |
|
205 | + $expr->eq($pf.'uid_owner', $qb->createNamedParameter($userId)), |
|
206 | + $expr->eq($pf.'uid_initiator', $qb->createNamedParameter($userId)) |
|
207 | 207 | ) |
208 | 208 | ); |
209 | 209 | } |
@@ -298,11 +298,11 @@ discard block |
||
298 | 298 | $expr = $qb->expr(); |
299 | 299 | $andX = $expr->andX(); |
300 | 300 | |
301 | - $andX->add($expr->eq($aliasM . '.user_id', $qb->createNamedParameter($userId))); |
|
302 | - $andX->add($expr->eq($aliasM . '.circle_id', $aliasC . '.unique_id')); |
|
303 | - $andX->add($expr->gte($aliasM . '.level', $qb->createNamedParameter(DeprecatedMember::LEVEL_MEMBER))); |
|
304 | - $andX->add($expr->eq($aliasM . '.instance', $qb->createNamedParameter(''))); |
|
305 | - $andX->add($expr->eq($aliasM . '.user_type', $qb->createNamedParameter(DeprecatedMember::TYPE_USER))); |
|
301 | + $andX->add($expr->eq($aliasM.'.user_id', $qb->createNamedParameter($userId))); |
|
302 | + $andX->add($expr->eq($aliasM.'.circle_id', $aliasC.'.unique_id')); |
|
303 | + $andX->add($expr->gte($aliasM.'.level', $qb->createNamedParameter(DeprecatedMember::LEVEL_MEMBER))); |
|
304 | + $andX->add($expr->eq($aliasM.'.instance', $qb->createNamedParameter(''))); |
|
305 | + $andX->add($expr->eq($aliasM.'.user_type', $qb->createNamedParameter(DeprecatedMember::TYPE_USER))); |
|
306 | 306 | |
307 | 307 | return $andX; |
308 | 308 | } |
@@ -330,11 +330,11 @@ discard block |
||
330 | 330 | |
331 | 331 | $andX = $expr->andX(); |
332 | 332 | |
333 | - $andX->add($expr->eq($aliasM . '.user_id', 'ncgu.gid')); |
|
334 | - $andX->add($expr->eq($aliasM . '.user_type', $qb->createNamedParameter(DeprecatedMember::TYPE_GROUP))); |
|
335 | - $andX->add($expr->eq($aliasM . '.instance', $qb->createNamedParameter(''))); |
|
336 | - $andX->add($expr->eq($aliasM . '.circle_id', $aliasC . '.unique_id')); |
|
337 | - $andX->add($expr->gte($aliasM . '.level', $qb->createNamedParameter(DeprecatedMember::LEVEL_MEMBER))); |
|
333 | + $andX->add($expr->eq($aliasM.'.user_id', 'ncgu.gid')); |
|
334 | + $andX->add($expr->eq($aliasM.'.user_type', $qb->createNamedParameter(DeprecatedMember::TYPE_GROUP))); |
|
335 | + $andX->add($expr->eq($aliasM.'.instance', $qb->createNamedParameter(''))); |
|
336 | + $andX->add($expr->eq($aliasM.'.circle_id', $aliasC.'.unique_id')); |
|
337 | + $andX->add($expr->gte($aliasM.'.level', $qb->createNamedParameter(DeprecatedMember::LEVEL_MEMBER))); |
|
338 | 338 | |
339 | 339 | return $andX; |
340 | 340 | } |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | $this->sendMailExistingShares($template, $author, $recipient); |
178 | 178 | $this->sendPasswordExistingShares($author, $recipient, $password); |
179 | 179 | } catch (Exception $e) { |
180 | - $this->miscService->log('Failed to send mail about existing share ' . $e->getMessage()); |
|
180 | + $this->miscService->log('Failed to send mail about existing share '.$e->getMessage()); |
|
181 | 181 | } |
182 | 182 | } |
183 | 183 | |
@@ -327,7 +327,7 @@ discard block |
||
327 | 327 | $authorName = ($authorUser instanceof IUser) ? $authorUser->getDisplayName() : $author; |
328 | 328 | $authorEmail = ($authorUser instanceof IUser) ? $authorUser->getEMailAddress() : null; |
329 | 329 | |
330 | - $this->miscService->log("Sending password mail about existing files to '" . $email . "'", 0); |
|
330 | + $this->miscService->log("Sending password mail about existing files to '".$email."'", 0); |
|
331 | 331 | |
332 | 332 | $plainBodyPart = $this->l10n->t( |
333 | 333 | "%1\$s shared multiple files with you.\nYou should have already received a separate mail with a link to access them.\n", |
@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | $message->setFrom([\OCP\Util::getDefaultEmailAddress($instanceName) => $senderName]); |
370 | 370 | if ($authorEmail !== null) { |
371 | 371 | $message->setReplyTo([$authorEmail => $authorName]); |
372 | - $emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan()); |
|
372 | + $emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan()); |
|
373 | 373 | } else { |
374 | 374 | $emailTemplate->addFooter(); |
375 | 375 | } |
@@ -116,13 +116,13 @@ discard block |
||
116 | 116 | } |
117 | 117 | |
118 | 118 | $this->miscService->log( |
119 | - 'updating member :' . json_encode($member) . ' from ' . json_encode($knownMember), 2 |
|
119 | + 'updating member :'.json_encode($member).' from '.json_encode($knownMember), 2 |
|
120 | 120 | ); |
121 | 121 | $this->membersRequest->updateMemberLevel($member); |
122 | 122 | } catch (MemberDoesNotExistException $e) { |
123 | 123 | try { |
124 | 124 | $this->miscService->log( |
125 | - 'creating member :' . json_encode($member), 2 |
|
125 | + 'creating member :'.json_encode($member), 2 |
|
126 | 126 | ); |
127 | 127 | $this->membersRequest->createMember($member); |
128 | 128 | } catch (MemberAlreadyExistsException $e) { |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | try { |
141 | 141 | $this->getMember($knownItem, $circle->getMembers(), $source); |
142 | 142 | } catch (MemberDoesNotExistException $e) { |
143 | - $this->miscService->log('removing deprecated member :' . json_encode($knownItem), 2); |
|
143 | + $this->miscService->log('removing deprecated member :'.json_encode($knownItem), 2); |
|
144 | 144 | $this->membersRequest->removeMember($knownItem); |
145 | 145 | $this->gsSharesRequest->removeGSSharesFromMember($knownItem); |
146 | 146 | } |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | } |
151 | 151 | } catch (Exception $e) { |
152 | 152 | $this->miscService->log( |
153 | - get_class($e) . ' on new event: ' . $e->getMessage() . ' - ' . json_encode($event), 1 |
|
153 | + get_class($e).' on new event: '.$e->getMessage().' - '.json_encode($event), 1 |
|
154 | 154 | ); |
155 | 155 | throw $e; |
156 | 156 | } |
@@ -246,13 +246,13 @@ discard block |
||
246 | 246 | $request->setDataSerialize($event); |
247 | 247 | |
248 | 248 | $result = $this->retrieveJson($request); |
249 | - $this->miscService->log('result ' . json_encode($result), 0); |
|
249 | + $this->miscService->log('result '.json_encode($result), 0); |
|
250 | 250 | if ($this->getInt('status', $result) === 0) { |
251 | 251 | throw new GlobalScaleEventException($this->get('error', $result)); |
252 | 252 | } |
253 | 253 | |
254 | 254 | $updatedData = $this->getArray('event', $result); |
255 | - $this->miscService->log('updatedEvent: ' . json_encode($updatedData), 0); |
|
255 | + $this->miscService->log('updatedEvent: '.json_encode($updatedData), 0); |
|
256 | 256 | if (!empty($updatedData)) { |
257 | 257 | $updated = new GSEvent(); |
258 | 258 | try { |
@@ -179,7 +179,6 @@ discard block |
||
179 | 179 | /** |
180 | 180 | * @param GSEvent $event |
181 | 181 | * @param string $instance |
182 | - * @param string $protocol |
|
183 | 182 | * |
184 | 183 | * @throws RequestContentException |
185 | 184 | * @throws RequestNetworkException |
@@ -328,7 +327,7 @@ discard block |
||
328 | 327 | |
329 | 328 | |
330 | 329 | /** |
331 | - * @param array $sync |
|
330 | + * @param DeprecatedCircle[] $sync |
|
332 | 331 | */ |
333 | 332 | public function synchronize(array $sync) { |
334 | 333 | if (!$this->configService->isGSAvailable()) { |
@@ -427,7 +427,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | */ |
@@ -132,7 +132,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
@@ -95,7 +95,7 @@ |
||
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 []; |