@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | '<error>WARNING! You are about to delete all data related to the Circles App!</error>' |
109 | 109 | ); |
110 | 110 | $question = new ConfirmationQuestion( |
111 | - '<comment>Do you really want to ' . $action . ' Circles ?</comment> (y/N) ', false, |
|
111 | + '<comment>Do you really want to '.$action.' Circles ?</comment> (y/N) ', false, |
|
112 | 112 | '/^(y|Y)/i' |
113 | 113 | ); |
114 | 114 | |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | $output->writeln('<error>WARNING! This operation is not reversible.</error>'); |
124 | 124 | |
125 | 125 | $question = new Question( |
126 | - '<comment>Please confirm this destructive operation by typing \'' . $action |
|
126 | + '<comment>Please confirm this destructive operation by typing \''.$action |
|
127 | 127 | . '\'</comment>: ', '' |
128 | 128 | ); |
129 | 129 | |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | $this->coreRequestBuilder->uninstall(); |
141 | 141 | } |
142 | 142 | |
143 | - $output->writeln('<info>' . $action . ' done</info>'); |
|
143 | + $output->writeln('<info>'.$action.' done</info>'); |
|
144 | 144 | |
145 | 145 | return 0; |
146 | 146 | } |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | $federatedUser = $this->federatedUserService->getLocalFederatedUser($userId); |
172 | 172 | $displayName = $this->maintenanceService->updateDisplayName($federatedUser); |
173 | 173 | if ($displayName !== '') { |
174 | - $output->writeln('Display name of ' . $federatedUser->getSingleId() . ' updated to ' . $displayName); |
|
174 | + $output->writeln('Display name of '.$federatedUser->getSingleId().' updated to '.$displayName); |
|
175 | 175 | } |
176 | 176 | |
177 | 177 | return 0; |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | try { |
187 | 187 | $this->refreshSingleDisplayName($row['uid'], $output); |
188 | 188 | } catch (Exception $e) { |
189 | - $output->writeln(get_class($e) . ' while trying to update display name of ' . $row['uid']); |
|
189 | + $output->writeln(get_class($e).' while trying to update display name of '.$row['uid']); |
|
190 | 190 | } |
191 | 191 | } |
192 | 192 | } |
@@ -442,7 +442,7 @@ discard block |
||
442 | 442 | |
443 | 443 | return array_filter( |
444 | 444 | array_map( |
445 | - function (ShareWrapper $wrapper) { |
|
445 | + function(ShareWrapper $wrapper) { |
|
446 | 446 | return $wrapper->getShare($this->rootFolder, $this->userManager, $this->urlGenerator); |
447 | 447 | }, $wrappedShares |
448 | 448 | ) |
@@ -494,7 +494,7 @@ discard block |
||
494 | 494 | |
495 | 495 | return array_filter( |
496 | 496 | array_map( |
497 | - function (ShareWrapper $wrapper) { |
|
497 | + function(ShareWrapper $wrapper) { |
|
498 | 498 | return $wrapper->getShare($this->rootFolder, $this->userManager, $this->urlGenerator); |
499 | 499 | }, $wrappedShares |
500 | 500 | ) |
@@ -543,7 +543,7 @@ discard block |
||
543 | 543 | |
544 | 544 | return array_filter( |
545 | 545 | array_map( |
546 | - function (ShareWrapper $wrapper) { |
|
546 | + function(ShareWrapper $wrapper) { |
|
547 | 547 | return $wrapper->getShare( |
548 | 548 | $this->rootFolder, $this->userManager, $this->urlGenerator, true |
549 | 549 | ); |
@@ -574,7 +574,7 @@ discard block |
||
574 | 574 | |
575 | 575 | $share = $wrappedShare->getShare($this->rootFolder, $this->userManager, $this->urlGenerator); |
576 | 576 | if ($share->getPassword() !== '') { |
577 | - $this->logger->notice('share is protected by a password, hash: ' . $share->getPassword()); |
|
577 | + $this->logger->notice('share is protected by a password, hash: '.$share->getPassword()); |
|
578 | 578 | } |
579 | 579 | |
580 | 580 | return $share; |
@@ -684,7 +684,7 @@ discard block |
||
684 | 684 | ]; |
685 | 685 | } else { |
686 | 686 | // we only store temp value, as token is unknown at this point |
687 | - $remote[$member->getUserid() . '@' . $member->getInstance()] = [ |
|
687 | + $remote[$member->getUserid().'@'.$member->getInstance()] = [ |
|
688 | 688 | 'node_id' => $share->getFileSource(), |
689 | 689 | 'shareId' => $share->getId(), |
690 | 690 | 'memberId' => $member->getId(), |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | $this->miscService = OC::$server->query(MiscService::class); |
115 | 115 | } catch (QueryException $e) { |
116 | 116 | OC::$server->getLogger() |
117 | - ->log(1, 'Circles: cannot init FileSharingBroadcaster - ' . $e->getMessage()); |
|
117 | + ->log(1, 'Circles: cannot init FileSharingBroadcaster - '.$e->getMessage()); |
|
118 | 118 | } |
119 | 119 | |
120 | 120 | try { |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | |
260 | 260 | $allShares = $this->fileSharesRequest->getSharesForCircle($member->getCircleId()); |
261 | 261 | $knownShares = array_map( |
262 | - function (SharesToken $shareToken) { |
|
262 | + function(SharesToken $shareToken) { |
|
263 | 263 | return $shareToken->getShareId(); |
264 | 264 | }, |
265 | 265 | $this->tokensRequest->getTokensFromMember($member) |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | * @throws IllegalIDChangeException |
307 | 307 | */ |
308 | 308 | private function generateShare($data): IShare { |
309 | - $this->logger->log(0, 'Regenerate shares from payload: ' . json_encode($data)); |
|
309 | + $this->logger->log(0, 'Regenerate shares from payload: '.json_encode($data)); |
|
310 | 310 | |
311 | 311 | $share = new Share($this->rootFolder, $this->userManager); |
312 | 312 | $share->setId($data['id']); |
@@ -399,7 +399,7 @@ discard block |
||
399 | 399 | $this->sendPasswordByMail($share, $displayName, $email, $password); |
400 | 400 | } catch (Exception $e) { |
401 | 401 | OC::$server->getLogger() |
402 | - ->log(1, 'Circles::sharedByMail - mail were not sent: ' . $e->getMessage()); |
|
402 | + ->log(1, 'Circles::sharedByMail - mail were not sent: '.$e->getMessage()); |
|
403 | 403 | } |
404 | 404 | } |
405 | 405 | |
@@ -417,8 +417,8 @@ discard block |
||
417 | 417 | $message = $this->mailer->createMessage(); |
418 | 418 | |
419 | 419 | $this->logger->log( |
420 | - 0, "Sending mail to circle '" . $circleName . "': " . $email . ' file: ' . $fileName |
|
421 | - . ' - link: ' . $link |
|
420 | + 0, "Sending mail to circle '".$circleName."': ".$email.' file: '.$fileName |
|
421 | + . ' - link: '.$link |
|
422 | 422 | ); |
423 | 423 | |
424 | 424 | $subject = $this->l10n->t('%s shared »%s« with you.', [$author, $fileName]); |
@@ -456,7 +456,7 @@ discard block |
||
456 | 456 | |
457 | 457 | $message = $this->mailer->createMessage(); |
458 | 458 | |
459 | - $this->logger->log(0, "Sending password mail to circle '" . $circleName . "': " . $email); |
|
459 | + $this->logger->log(0, "Sending password mail to circle '".$circleName."': ".$email); |
|
460 | 460 | |
461 | 461 | $filename = $share->getNode() |
462 | 462 | ->getName(); |
@@ -511,7 +511,7 @@ discard block |
||
511 | 511 | $message->setFrom([\OCP\Util::getDefaultEmailAddress($instanceName) => $senderName]); |
512 | 512 | if ($initiatorEmailAddress !== null) { |
513 | 513 | $message->setReplyTo([$initiatorEmailAddress => $initiatorDisplayName]); |
514 | - $emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan()); |
|
514 | + $emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan()); |
|
515 | 515 | } else { |
516 | 516 | $emailTemplate->addFooter(); |
517 | 517 | } |
@@ -546,7 +546,7 @@ discard block |
||
546 | 546 | $emailTemplate->addHeader(); |
547 | 547 | $emailTemplate->addHeading($subject, false); |
548 | 548 | $emailTemplate->addBodyText( |
549 | - htmlspecialchars($text) . '<br>' . htmlspecialchars( |
|
549 | + htmlspecialchars($text).'<br>'.htmlspecialchars( |
|
550 | 550 | $this->l10n->t('Click the button below to open it.') |
551 | 551 | ), $text |
552 | 552 | ); |
@@ -592,7 +592,7 @@ discard block |
||
592 | 592 | $this->sendMailExistingShares($template, $author->getCachedName(), $recipient); |
593 | 593 | $this->sendPasswordExistingShares($author, $recipient, $password); |
594 | 594 | } catch (Exception $e) { |
595 | - $this->logger->log(2, 'Failed to send mail about existing share ' . $e->getMessage()); |
|
595 | + $this->logger->log(2, 'Failed to send mail about existing share '.$e->getMessage()); |
|
596 | 596 | } |
597 | 597 | } |
598 | 598 | |
@@ -615,7 +615,7 @@ discard block |
||
615 | 615 | $authorName = ($authorUser instanceof IUser) ? $authorUser->getDisplayName() : $author; |
616 | 616 | $authorEmail = ($authorUser instanceof IUser) ? $authorUser->getEMailAddress() : null; |
617 | 617 | |
618 | - $this->logger->log(0, "Sending password mail about existing files to '" . $email . "'"); |
|
618 | + $this->logger->log(0, "Sending password mail about existing files to '".$email."'"); |
|
619 | 619 | |
620 | 620 | $plainBodyPart = $this->l10n->t( |
621 | 621 | "%1\$s shared multiple files with you.\nYou should have already received a separate email with a link to access them.\n", |
@@ -657,7 +657,7 @@ discard block |
||
657 | 657 | $message->setFrom([\OCP\Util::getDefaultEmailAddress($instanceName) => $senderName]); |
658 | 658 | if ($authorEmail !== null) { |
659 | 659 | $message->setReplyTo([$authorEmail => $authorName]); |
660 | - $emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan()); |
|
660 | + $emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan()); |
|
661 | 661 | } else { |
662 | 662 | $emailTemplate->addFooter(); |
663 | 663 | } |
@@ -702,7 +702,7 @@ discard block |
||
702 | 702 | */ |
703 | 703 | protected function generateMailExitingShares($author, $circleName) { |
704 | 704 | $this->logger->log( |
705 | - 0, "Generating mail about existing share mail from '" . $author . "' in " |
|
705 | + 0, "Generating mail about existing share mail from '".$author."' in " |
|
706 | 706 | . $circleName |
707 | 707 | ); |
708 | 708 |
@@ -196,8 +196,8 @@ discard block |
||
196 | 196 | throw new SignatureException('missing elements in \'headers\''); |
197 | 197 | } |
198 | 198 | |
199 | - $target = strtolower($request->getMethod()) . ' ' . $request->getRequestUri(); |
|
200 | - $estimated = ['(request-target): ' . $target]; |
|
199 | + $target = strtolower($request->getMethod()).' '.$request->getRequestUri(); |
|
200 | + $estimated = ['(request-target): '.$target]; |
|
201 | 201 | |
202 | 202 | foreach ($headers as $key) { |
203 | 203 | $value = $request->getHeader($key); |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | throw new SignatureException('empty elements in \'headers\''); |
209 | 209 | } |
210 | 210 | |
211 | - $estimated[] = $key . ': ' . $value; |
|
211 | + $estimated[] = $key.': '.$value; |
|
212 | 212 | } |
213 | 213 | $signedRequest->setClearSignature(implode("\n", $estimated)); |
214 | 214 | } |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | $request = $signedRequest->getOutgoingRequest(); |
281 | 281 | |
282 | 282 | $data = new SimpleDataStore(); |
283 | - $data->s('(request-target)', NCRequest::method($request->getType()) . ' ' . $request->getPath()) |
|
283 | + $data->s('(request-target)', NCRequest::method($request->getType()).' '.$request->getPath()) |
|
284 | 284 | ->sInt('content-length', strlen($signedRequest->getBody())) |
285 | 285 | ->s('date', gmdate($this->dateHeader)) |
286 | 286 | ->s('digest', $signedRequest->getDigest()) |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | foreach ($data->keys() as $element) { |
300 | 300 | try { |
301 | 301 | $value = $data->gItem($element); |
302 | - $signing[] = $element . ': ' . $value; |
|
302 | + $signing[] = $element.': '.$value; |
|
303 | 303 | if ($element !== '(request-target)') { |
304 | 304 | $signedRequest->getOutgoingRequest()->addHeader($element, $value); |
305 | 305 | } |
@@ -332,10 +332,10 @@ discard block |
||
332 | 332 | $headers = array_diff($signedRequest->getSignatureHeader()->keys(), ['(request-target)']); |
333 | 333 | $signatory = $signedRequest->getSignatory(); |
334 | 334 | $signatureElements = [ |
335 | - 'keyId="' . $signatory->getKeyId() . '"', |
|
336 | - 'algorithm="' . $this->getChosenEncryption($signatory) . '"', |
|
337 | - 'headers="' . implode(' ', $headers) . '"', |
|
338 | - 'signature="' . $signedRequest->getSignedSignature() . '"' |
|
335 | + 'keyId="'.$signatory->getKeyId().'"', |
|
336 | + 'algorithm="'.$this->getChosenEncryption($signatory).'"', |
|
337 | + 'headers="'.implode(' ', $headers).'"', |
|
338 | + 'signature="'.$signedRequest->getSignedSignature().'"' |
|
339 | 339 | ]; |
340 | 340 | |
341 | 341 | $signedRequest->getOutgoingRequest()->addHeader('Signature', implode(',', $signatureElements)); |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | */ |
196 | 196 | public function limitToCreation(int $delay = 0): self { |
197 | 197 | $date = new DateTime('now'); |
198 | - $date->sub(new DateInterval('PT' . $delay . 'M')); |
|
198 | + $date->sub(new DateInterval('PT'.$delay.'M')); |
|
199 | 199 | |
200 | 200 | $this->limitToDBFieldDateTime('creation', $date, true); |
201 | 201 | |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | $expr = $this->expr(); |
213 | 213 | $pf = ($this->getType() === DBALQueryBuilder::SELECT) ? $this->getDefaultSelectAlias() |
214 | 214 | . '.' : ''; |
215 | - $field = $pf . $field; |
|
215 | + $field = $pf.$field; |
|
216 | 216 | |
217 | 217 | $orX = $expr->orX(); |
218 | 218 | $orX->add( |
@@ -242,8 +242,8 @@ discard block |
||
242 | 242 | } |
243 | 243 | |
244 | 244 | $expr = $this->expr(); |
245 | - $pf = ($this->getType() === DBALQueryBuilder::SELECT) ? $this->getDefaultSelectAlias() . '.' : ''; |
|
246 | - $field = $pf . $field; |
|
245 | + $pf = ($this->getType() === DBALQueryBuilder::SELECT) ? $this->getDefaultSelectAlias().'.' : ''; |
|
246 | + $field = $pf.$field; |
|
247 | 247 | |
248 | 248 | $orX = $expr->orX(); |
249 | 249 | $orX->add( |
@@ -261,8 +261,8 @@ discard block |
||
261 | 261 | public function searchInDBField(string $field, string $value): void { |
262 | 262 | $expr = $this->expr(); |
263 | 263 | |
264 | - $pf = ($this->getType() === DBALQueryBuilder::SELECT) ? $this->getDefaultSelectAlias() . '.' : ''; |
|
265 | - $field = $pf . $field; |
|
264 | + $pf = ($this->getType() === DBALQueryBuilder::SELECT) ? $this->getDefaultSelectAlias().'.' : ''; |
|
265 | + $field = $pf.$field; |
|
266 | 266 | |
267 | 267 | $this->andWhere($expr->iLike($field, $this->createNamedParameter($value))); |
268 | 268 | } |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | */ |
386 | 386 | public function exprLike(string $field, string $value, string $alias = '', bool $cs = true): string { |
387 | 387 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
388 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
388 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
389 | 389 | } |
390 | 390 | |
391 | 391 | $expr = $this->expr(); |
@@ -398,7 +398,7 @@ discard block |
||
398 | 398 | |
399 | 399 | public function exprLimit(string $field, string $value, string $alias = '', bool $cs = true): string { |
400 | 400 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
401 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
401 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
402 | 402 | } |
403 | 403 | |
404 | 404 | $expr = $this->expr(); |
@@ -416,7 +416,7 @@ discard block |
||
416 | 416 | |
417 | 417 | public function exprLimitInt(string $field, int $value, string $alias = ''): string { |
418 | 418 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
419 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
419 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
420 | 420 | } |
421 | 421 | |
422 | 422 | $expr = $this->expr(); |
@@ -434,7 +434,7 @@ discard block |
||
434 | 434 | */ |
435 | 435 | public function exprLimitBool(string $field, bool $value, string $alias = ''): string { |
436 | 436 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
437 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
437 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
438 | 438 | } |
439 | 439 | |
440 | 440 | $expr = $this->expr(); |
@@ -455,7 +455,7 @@ discard block |
||
455 | 455 | string $alias = '', |
456 | 456 | ): ICompositeExpression { |
457 | 457 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
458 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
458 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
459 | 459 | } |
460 | 460 | |
461 | 461 | $expr = $this->expr(); |
@@ -481,7 +481,7 @@ discard block |
||
481 | 481 | string $alias = '', |
482 | 482 | ): ICompositeExpression { |
483 | 483 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
484 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
484 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
485 | 485 | } |
486 | 486 | |
487 | 487 | $expr = $this->expr(); |
@@ -536,7 +536,7 @@ discard block |
||
536 | 536 | int $type = IQueryBuilder::PARAM_STR_ARRAY, |
537 | 537 | ): string { |
538 | 538 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
539 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
539 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
540 | 540 | } |
541 | 541 | |
542 | 542 | $expr = $this->expr(); |
@@ -553,7 +553,7 @@ discard block |
||
553 | 553 | */ |
554 | 554 | public function exprLimitBitwise(string $field, int $flag, string $alias = ''): string { |
555 | 555 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
556 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
556 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
557 | 557 | } |
558 | 558 | |
559 | 559 | $expr = $this->expr(); |
@@ -575,7 +575,7 @@ discard block |
||
575 | 575 | */ |
576 | 576 | public function exprLt(string $field, int $value, bool $lte = false, string $alias = ''): string { |
577 | 577 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
578 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
578 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
579 | 579 | } |
580 | 580 | |
581 | 581 | $expr = $this->expr(); |
@@ -597,7 +597,7 @@ discard block |
||
597 | 597 | */ |
598 | 598 | public function exprGt(string $field, int $value, bool $gte = false, string $alias = ''): string { |
599 | 599 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
600 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
600 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
601 | 601 | } |
602 | 602 | |
603 | 603 | $expr = $this->expr(); |
@@ -706,7 +706,7 @@ discard block |
||
706 | 706 | */ |
707 | 707 | public function exprUnlike(string $field, string $value, string $alias = '', bool $cs = true): string { |
708 | 708 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
709 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
709 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
710 | 710 | } |
711 | 711 | |
712 | 712 | $expr = $this->expr(); |
@@ -730,7 +730,7 @@ discard block |
||
730 | 730 | */ |
731 | 731 | public function exprFilter(string $field, string $value, string $alias = '', bool $cs = true): string { |
732 | 732 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
733 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
733 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
734 | 734 | } |
735 | 735 | |
736 | 736 | $expr = $this->expr(); |
@@ -756,7 +756,7 @@ discard block |
||
756 | 756 | */ |
757 | 757 | public function exprFilterInt(string $field, int $value, string $alias = ''): string { |
758 | 758 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
759 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
759 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
760 | 760 | } |
761 | 761 | |
762 | 762 | $expr = $this->expr(); |
@@ -774,7 +774,7 @@ discard block |
||
774 | 774 | */ |
775 | 775 | public function exprFilterBool(string $field, bool $value, string $alias = ''): string { |
776 | 776 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
777 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
777 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
778 | 778 | } |
779 | 779 | |
780 | 780 | $expr = $this->expr(); |
@@ -795,7 +795,7 @@ discard block |
||
795 | 795 | string $alias = '', |
796 | 796 | ): ICompositeExpression { |
797 | 797 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
798 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
798 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
799 | 799 | } |
800 | 800 | |
801 | 801 | $expr = $this->expr(); |
@@ -821,7 +821,7 @@ discard block |
||
821 | 821 | string $alias = '', |
822 | 822 | ): ICompositeExpression { |
823 | 823 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
824 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
824 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
825 | 825 | } |
826 | 826 | |
827 | 827 | $expr = $this->expr(); |
@@ -850,7 +850,7 @@ discard block |
||
850 | 850 | bool $cs = true, |
851 | 851 | ): ICompositeExpression { |
852 | 852 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
853 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
853 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
854 | 854 | } |
855 | 855 | |
856 | 856 | $orX = $this->expr()->orX(); |
@@ -875,7 +875,7 @@ discard block |
||
875 | 875 | */ |
876 | 876 | public function exprFilterInArray(string $field, array $values, string $alias = ''): string { |
877 | 877 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
878 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
878 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
879 | 879 | } |
880 | 880 | |
881 | 881 | $expr = $this->expr(); |
@@ -893,7 +893,7 @@ discard block |
||
893 | 893 | */ |
894 | 894 | public function exprFilterBitwise(string $field, int $flag, string $alias = ''): string { |
895 | 895 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
896 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
896 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
897 | 897 | } |
898 | 898 | |
899 | 899 | $expr = $this->expr(); |
@@ -1054,12 +1054,12 @@ discard block |
||
1054 | 1054 | string $alias = '', |
1055 | 1055 | ): self { |
1056 | 1056 | $selectFields = array_map( |
1057 | - function (string $item) use ($alias) { |
|
1057 | + function(string $item) use ($alias) { |
|
1058 | 1058 | if ($alias === '') { |
1059 | 1059 | return $item; |
1060 | 1060 | } |
1061 | 1061 | |
1062 | - return $alias . '.' . $item; |
|
1062 | + return $alias.'.'.$item; |
|
1063 | 1063 | }, $fields |
1064 | 1064 | ); |
1065 | 1065 | |
@@ -1085,13 +1085,13 @@ discard block |
||
1085 | 1085 | string $prefix, |
1086 | 1086 | array $default = [], |
1087 | 1087 | ): self { |
1088 | - $prefix = trim($prefix) . '_'; |
|
1088 | + $prefix = trim($prefix).'_'; |
|
1089 | 1089 | foreach ($default as $k => $v) { |
1090 | - $this->addDefaultValue($prefix . $k, (string)$v); |
|
1090 | + $this->addDefaultValue($prefix.$k, (string)$v); |
|
1091 | 1091 | } |
1092 | 1092 | |
1093 | 1093 | foreach ($fields as $field) { |
1094 | - $this->selectAlias($alias . '.' . $field, $prefix . $field); |
|
1094 | + $this->selectAlias($alias.'.'.$field, $prefix.$field); |
|
1095 | 1095 | } |
1096 | 1096 | |
1097 | 1097 | return $this; |
@@ -115,7 +115,7 @@ |
||
115 | 115 | */ |
116 | 116 | public function setBody(string $body): self { |
117 | 117 | $this->body = $body; |
118 | - $this->setDigest('SHA-256=' . base64_encode(hash('sha256', utf8_encode($body), true))); |
|
118 | + $this->setDigest('SHA-256='.base64_encode(hash('sha256', utf8_encode($body), true))); |
|
119 | 119 | |
120 | 120 | return $this; |
121 | 121 | } |
@@ -78,18 +78,18 @@ discard block |
||
78 | 78 | |
79 | 79 | $name = $rowCG['display_name']; |
80 | 80 | while (strlen($name) < 3) { |
81 | - $name = '_' . $name; |
|
81 | + $name = '_'.$name; |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | // based on owner's userid, we create federateduser and a new circle |
85 | - $this->output->writeln('+ New Team <info>' . $name . '</info>, owner by <info>' . $ownerId . '</info>'); |
|
85 | + $this->output->writeln('+ New Team <info>'.$name.'</info>, owner by <info>'.$ownerId.'</info>'); |
|
86 | 86 | $owner = $this->cachedFed($ownerId); |
87 | 87 | |
88 | 88 | $this->circlesManager->startSession($owner); |
89 | 89 | try { |
90 | 90 | $circle = $this->circlesManager->createCircle($name); |
91 | 91 | } catch (\Exception $e) { |
92 | - $this->output->writeln('<error>' . get_class($e) . ' ' . $e->getMessage() . '</error> with data ' . json_encode($rowCG)); |
|
92 | + $this->output->writeln('<error>'.get_class($e).' '.$e->getMessage().'</error> with data '.json_encode($rowCG)); |
|
93 | 93 | $this->logger->log(2, 'error while creating circle', ['exception' => $e]); |
94 | 94 | $this->circlesManager->stopSession(); |
95 | 95 | continue; |
@@ -116,13 +116,13 @@ discard block |
||
116 | 116 | continue; // owner is already in the circles |
117 | 117 | } |
118 | 118 | |
119 | - $this->output->writeln(' - new member <info>' . $userId . '</info>'); |
|
119 | + $this->output->writeln(' - new member <info>'.$userId.'</info>'); |
|
120 | 120 | $member = $this->circlesManager->addMember($circle->getSingleId(), $this->cachedFed($userId)); |
121 | 121 | if ($rowM['role'] === '1') { |
122 | 122 | $this->circlesManager->levelMember($member->getId(), Member::LEVEL_ADMIN); |
123 | 123 | } |
124 | 124 | } catch (\Exception $e) { |
125 | - $this->output->writeln('<error>' . get_class($e) . ' ' . $e->getMessage() . '</error>'); |
|
125 | + $this->output->writeln('<error>'.get_class($e).' '.$e->getMessage().'</error>'); |
|
126 | 126 | $this->logger->log(2, 'error while migrating custom group member', ['exception' => $e]); |
127 | 127 | } |
128 | 128 | } |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | ->where($update->expr()->in('id', $update->createNamedParameter($shareIds, IQueryBuilder::PARAM_INT_ARRAY))); |
159 | 159 | |
160 | 160 | $count = $update->executeStatement(); |
161 | - $this->output->writeln('> ' . $count . ' shares updated'); |
|
161 | + $this->output->writeln('> '.$count.' shares updated'); |
|
162 | 162 | |
163 | 163 | $this->fixShareChildren($shareIds, $memberIds); |
164 | 164 | } |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | $count += $update->executeStatement(); |
199 | 199 | } |
200 | 200 | |
201 | - $this->output->writeln('> ' . $count . ' children shares updated'); |
|
201 | + $this->output->writeln('> '.$count.' children shares updated'); |
|
202 | 202 | } |
203 | 203 | |
204 | 204 |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | } catch (FederatedItemException $e) { |
110 | 110 | if ($input->getOption('status-code')) { |
111 | 111 | throw new FederatedItemException( |
112 | - ' [' . get_class($e) . ', ' . $e->getStatus() . ']' . "\n" . $e->getMessage() |
|
112 | + ' ['.get_class($e).', '.$e->getStatus().']'."\n".$e->getMessage() |
|
113 | 113 | ); |
114 | 114 | } |
115 | 115 | |
@@ -148,10 +148,10 @@ discard block |
||
148 | 148 | try { |
149 | 149 | $users = $this->retrieveJson($request); |
150 | 150 | } catch ( |
151 | - RequestContentException| |
|
152 | - RequestNetworkException| |
|
153 | - RequestResultSizeException| |
|
154 | - RequestServerException| |
|
151 | + RequestContentException | |
|
152 | + RequestNetworkException | |
|
153 | + RequestResultSizeException | |
|
154 | + RequestServerException | |
|
155 | 155 | RequestResultNotJsonException $e |
156 | 156 | ) { |
157 | 157 | return ''; |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | $instance = $host; |
170 | 170 | } |
171 | 171 | |
172 | - $result[] = $user['userid']['value'] . ' <info>@' . $host . '</info>'; |
|
172 | + $result[] = $user['userid']['value'].' <info>@'.$host.'</info>'; |
|
173 | 173 | } |
174 | 174 | |
175 | 175 | // if ($userId === '') { |
@@ -167,11 +167,11 @@ discard block |
||
167 | 167 | $this->federatedUserService->commandLineInitiator($initiator, $initiatorType, $circleId, true); |
168 | 168 | $circle = $this->circleService->getCircle($circleId); |
169 | 169 | |
170 | - $output->writeln('<info>Name</info>: ' . $circle->getName()); |
|
170 | + $output->writeln('<info>Name</info>: '.$circle->getName()); |
|
171 | 171 | $owner = $circle->getOwner(); |
172 | - $output->writeln('<info>Owner</info>: ' . $owner->getUserId() . '@' . $owner->getInstance()); |
|
172 | + $output->writeln('<info>Owner</info>: '.$owner->getUserId().'@'.$owner->getInstance()); |
|
173 | 173 | $type = implode(', ', Circle::getCircleFlags($circle, Circle::FLAGS_LONG)); |
174 | - $output->writeln('<info>Config</info>: ' . $type); |
|
174 | + $output->writeln('<info>Config</info>: '.$type); |
|
175 | 175 | $output->writeln(' '); |
176 | 176 | |
177 | 177 | $tree = new TreeNode(null, new SimpleDataStore(['circle' => $circle])); |
@@ -236,8 +236,7 @@ discard block |
||
236 | 236 | $member, |
237 | 237 | $this->input->getOption('display-name') |
238 | 238 | ), |
239 | - ($level > 0) ? Member::$DEF_LEVEL[$level] : |
|
240 | - '(' . strtolower($member->getStatus()) . ')', |
|
239 | + ($level > 0) ? Member::$DEF_LEVEL[$level] : '('.strtolower($member->getStatus()).')', |
|
241 | 240 | ($member->hasInvitedBy()) ? $this->configService->displayFederatedUser( |
242 | 241 | $member->getInvitedBy(), |
243 | 242 | $this->input->getOption('display-name') |
@@ -327,7 +326,7 @@ discard block |
||
327 | 326 | $circle = $this->remoteService->getCircleFromInstance( |
328 | 327 | $member->getSingleId(), $member->getInstance(), $data |
329 | 328 | ); |
330 | - } catch (CircleNotFoundException|RemoteInstanceException $e) { |
|
329 | + } catch (CircleNotFoundException | RemoteInstanceException $e) { |
|
331 | 330 | } |
332 | 331 | } else { |
333 | 332 | $this->federatedUserService->commandLineInitiator( |
@@ -403,14 +402,14 @@ discard block |
||
403 | 402 | $member = $data->gObj('member', Member::class); |
404 | 403 | |
405 | 404 | if ($lineNumber === 1) { |
406 | - $line .= '<info>' . $member->getSingleId() . '</info>'; |
|
405 | + $line .= '<info>'.$member->getSingleId().'</info>'; |
|
407 | 406 | if (!$this->configService->isLocalInstance($member->getInstance())) { |
408 | - $line .= '@' . $member->getInstance(); |
|
407 | + $line .= '@'.$member->getInstance(); |
|
409 | 408 | } |
410 | - $line .= ' (' . Member::$DEF_LEVEL[$member->getLevel()] . ')'; |
|
409 | + $line .= ' ('.Member::$DEF_LEVEL[$member->getLevel()].')'; |
|
411 | 410 | |
412 | - $line .= ' <info>MemberId</info>: ' . $member->getId(); |
|
413 | - $line .= ' <info>Name</info>: ' . $this->configService->displayFederatedUser( |
|
411 | + $line .= ' <info>MemberId</info>: '.$member->getId(); |
|
412 | + $line .= ' <info>Name</info>: '.$this->configService->displayFederatedUser( |
|
414 | 413 | $member, |
415 | 414 | $this->input->getOption('display-name') |
416 | 415 | ); |
@@ -418,7 +417,7 @@ discard block |
||
418 | 417 | $line .= ' <info>Source</info>: ' |
419 | 418 | . Circle::$DEF_SOURCE[$member->getBasedOn()->getSource()]; |
420 | 419 | } else { |
421 | - $line .= ' <info>Type</info>: ' . Member::$TYPE[$member->getUserType()]; |
|
420 | + $line .= ' <info>Type</info>: '.Member::$TYPE[$member->getUserType()]; |
|
422 | 421 | } |
423 | 422 | } |
424 | 423 | |
@@ -431,21 +430,21 @@ discard block |
||
431 | 430 | return $line; |
432 | 431 | } |
433 | 432 | $owner = $circle->getOwner(); |
434 | - $line .= '<info>Owner</info>: ' . $owner->getUserId() . '@' . $owner->getInstance(); |
|
433 | + $line .= '<info>Owner</info>: '.$owner->getUserId().'@'.$owner->getInstance(); |
|
435 | 434 | $type = implode(', ', Circle::getCircleFlags($circle, Circle::FLAGS_LONG)); |
436 | - $line .= ($type === '') ? '' : ' <info>Config</info>: ' . $type; |
|
435 | + $line .= ($type === '') ? '' : ' <info>Config</info>: '.$type; |
|
437 | 436 | } |
438 | 437 | } else { |
439 | 438 | if ($lineNumber === 1 && !is_null($circle)) { |
440 | - $line .= '<info>' . $circle->getSingleId() . '</info>'; |
|
439 | + $line .= '<info>'.$circle->getSingleId().'</info>'; |
|
441 | 440 | if (!$this->configService->isLocalInstance($circle->getInstance())) { |
442 | - $line .= '@' . $circle->getInstance(); |
|
441 | + $line .= '@'.$circle->getInstance(); |
|
443 | 442 | } |
444 | 443 | } |
445 | 444 | } |
446 | 445 | |
447 | 446 | return $line; |
448 | - } catch (InvalidItemException|ItemNotFoundException|UnknownTypeException $e) { |
|
447 | + } catch (InvalidItemException | ItemNotFoundException | UnknownTypeException $e) { |
|
449 | 448 | } |
450 | 449 | |
451 | 450 | return ''; |