@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | throw new Exception('Please specify a --type for the test'); |
131 | 131 | } |
132 | 132 | if ($test !== '' && !in_array($type, self::$checks)) { |
133 | - throw new Exception('Unknown type: ' . implode(', ', self::$checks)); |
|
133 | + throw new Exception('Unknown type: '.implode(', ', self::$checks)); |
|
134 | 134 | } |
135 | 135 | |
136 | 136 | // $this->configService->setAppValue(ConfigService::TEST_NC_BASE, $test); |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | } |
187 | 187 | |
188 | 188 | $output->writeln(''); |
189 | - $output->writeln('* testing current address: ' . $test); |
|
189 | + $output->writeln('* testing current address: '.$test); |
|
190 | 190 | |
191 | 191 | try { |
192 | 192 | $this->setupLoopback($input, $output, $test); |
@@ -220,8 +220,8 @@ discard block |
||
220 | 220 | continue; |
221 | 221 | } |
222 | 222 | |
223 | - $loopback = rtrim($scheme . '://' . $cloudId . $path, '/'); |
|
224 | - $output->writeln('* testing address: ' . $loopback . ' '); |
|
223 | + $loopback = rtrim($scheme.'://'.$cloudId.$path, '/'); |
|
224 | + $output->writeln('* testing address: '.$loopback.' '); |
|
225 | 225 | |
226 | 226 | try { |
227 | 227 | $this->setupLoopback($input, $output, $loopback); |
@@ -292,8 +292,8 @@ discard block |
||
292 | 292 | $test = new FederatedEvent(LoopbackTest::class); |
293 | 293 | $this->federatedEventService->newEvent($test); |
294 | 294 | $output->writeln( |
295 | - '<info>' . $test->getWrapperToken() . '</info> ' . |
|
296 | - '(took ' . (round(microtime(true) * 1000) - $timer) . 'ms)' |
|
295 | + '<info>'.$test->getWrapperToken().'</info> '. |
|
296 | + '(took '.(round(microtime(true) * 1000) - $timer).'ms)' |
|
297 | 297 | ); |
298 | 298 | |
299 | 299 | $output->writeln('- Waiting for async process to finish (5s)'); |
@@ -312,18 +312,18 @@ discard block |
||
312 | 312 | |
313 | 313 | $checkVerify = $wrapper->getEvent()->getData()->gInt('verify'); |
314 | 314 | if ($checkVerify === LoopbackTest::VERIFY) { |
315 | - $output->write('<info>verify=' . $checkVerify . '</info> '); |
|
315 | + $output->write('<info>verify='.$checkVerify.'</info> '); |
|
316 | 316 | } else { |
317 | - $output->writeln('<error>verify=' . $checkVerify . '</error>'); |
|
317 | + $output->writeln('<error>verify='.$checkVerify.'</error>'); |
|
318 | 318 | |
319 | 319 | return false; |
320 | 320 | } |
321 | 321 | |
322 | 322 | $checkManage = $wrapper->getResult()->gInt('manage'); |
323 | 323 | if ($checkManage === LoopbackTest::MANAGE) { |
324 | - $output->write('<info>manage=' . $checkManage . '</info> '); |
|
324 | + $output->write('<info>manage='.$checkManage.'</info> '); |
|
325 | 325 | } else { |
326 | - $output->writeln('<error>manage=' . $checkManage . '</error>'); |
|
326 | + $output->writeln('<error>manage='.$checkManage.'</error>'); |
|
327 | 327 | |
328 | 328 | return false; |
329 | 329 | } |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | $this->configService->setAppValue(ConfigService::LOOPBACK_CLOUD_ID, $cloudId); |
362 | 362 | $this->configService->setAppValue(ConfigService::LOOPBACK_CLOUD_PATH, $path); |
363 | 363 | $output->writeln( |
364 | - '- Address <info>' . $loopback . '</info> is now used as <info>loopback</info>' |
|
364 | + '- Address <info>'.$loopback.'</info> is now used as <info>loopback</info>' |
|
365 | 365 | ); |
366 | 366 | } |
367 | 367 | |
@@ -413,8 +413,8 @@ discard block |
||
413 | 413 | continue; |
414 | 414 | } |
415 | 415 | |
416 | - $internal = rtrim($scheme . '://' . $cloudId, '/'); |
|
417 | - $fullInternal = rtrim($scheme . '://' . $cloudId . $path, '/'); |
|
416 | + $internal = rtrim($scheme.'://'.$cloudId, '/'); |
|
417 | + $fullInternal = rtrim($scheme.'://'.$cloudId.$path, '/'); |
|
418 | 418 | |
419 | 419 | $question = new ConfirmationQuestion( |
420 | 420 | '<comment>Do you want to check the validity of this internal address?</comment> (Y/n) ', true, |
@@ -433,9 +433,9 @@ discard block |
||
433 | 433 | 'You will need to run this <info>curl</info> command from a terminal on your local network and paste its result: ' |
434 | 434 | ); |
435 | 435 | $output->writeln( |
436 | - ' curl -L "' . $internal |
|
436 | + ' curl -L "'.$internal |
|
437 | 437 | . '/.well-known/webfinger?resource=http://nextcloud.com/&test=' |
438 | - . $testToken . '"' |
|
438 | + . $testToken.'"' |
|
439 | 439 | ); |
440 | 440 | |
441 | 441 | $output->writeln('paste the result here: '); |
@@ -469,7 +469,7 @@ discard block |
||
469 | 469 | |
470 | 470 | if ($pastedHref !== $href) { |
471 | 471 | $output->writeln( |
472 | - '<error>The returned data (' . $pastedHref . ') are not the one expected: </error>' |
|
472 | + '<error>The returned data ('.$pastedHref.') are not the one expected: </error>' |
|
473 | 473 | . $href |
474 | 474 | ); |
475 | 475 | continue; |
@@ -481,7 +481,7 @@ discard block |
||
481 | 481 | 'Next step, please run this <info>curl</info> command from a terminal on your local network and paste its result: ' |
482 | 482 | ); |
483 | 483 | $output->writeln( |
484 | - ' curl -L "' . $pastedHref . '?test=' . $testToken . '" -H "Accept: application/json"' |
|
484 | + ' curl -L "'.$pastedHref.'?test='.$testToken.'" -H "Accept: application/json"' |
|
485 | 485 | ); |
486 | 486 | |
487 | 487 | $output->writeln('paste the result here: '); |
@@ -497,9 +497,9 @@ discard block |
||
497 | 497 | || $appSignatory->getRoot() !== $pastedSignatory->g('root')) { |
498 | 498 | $output->writeln( |
499 | 499 | '<error>The returned data (' |
500 | - . $pastedSignatory->g('uid') . '/' . $pastedSignatory->g('root') |
|
500 | + . $pastedSignatory->g('uid').'/'.$pastedSignatory->g('root') |
|
501 | 501 | . ') are not the one expected: </error>' |
502 | - . $appSignatory->getUid(true) . '/' . $appSignatory->getRoot() |
|
502 | + . $appSignatory->getUid(true).'/'.$appSignatory->getRoot() |
|
503 | 503 | ); |
504 | 504 | continue; |
505 | 505 | } |
@@ -525,7 +525,7 @@ discard block |
||
525 | 525 | |
526 | 526 | $output->writeln(''); |
527 | 527 | $question = new ConfirmationQuestion( |
528 | - '- Do you want to save <info>' . $internal |
|
528 | + '- Do you want to save <info>'.$internal |
|
529 | 529 | . '</info> as your <info>internal</info> address ? (y/N) ', |
530 | 530 | false, '/^(y|Y)/i' |
531 | 531 | ); |
@@ -541,7 +541,7 @@ discard block |
||
541 | 541 | $this->configService->setAppValue(ConfigService::INTERNAL_CLOUD_ID, $cloudId); |
542 | 542 | $this->configService->setAppValue(ConfigService::INTERNAL_CLOUD_PATH, $path); |
543 | 543 | |
544 | - $output->writeln('- Address <info>' . $internal . '</info> is now used as <info>internal</info>'); |
|
544 | + $output->writeln('- Address <info>'.$internal.'</info> is now used as <info>internal</info>'); |
|
545 | 545 | } |
546 | 546 | |
547 | 547 | /** |
@@ -591,8 +591,8 @@ discard block |
||
591 | 591 | continue; |
592 | 592 | } |
593 | 593 | |
594 | - $frontal = rtrim($scheme . '://' . $cloudId, '/'); |
|
595 | - $fullFrontal = rtrim($scheme . '://' . $cloudId . $path, '/'); |
|
594 | + $frontal = rtrim($scheme.'://'.$cloudId, '/'); |
|
595 | + $fullFrontal = rtrim($scheme.'://'.$cloudId.$path, '/'); |
|
596 | 596 | |
597 | 597 | $question = new ConfirmationQuestion( |
598 | 598 | '<comment>Do you want to check the validity of this frontal address?</comment> (y/N) ', false, |
@@ -611,9 +611,9 @@ discard block |
||
611 | 611 | 'You will need to run this <info>curl</info> command from a remote terminal and paste its result: ' |
612 | 612 | ); |
613 | 613 | $output->writeln( |
614 | - ' curl -L "' . $frontal |
|
614 | + ' curl -L "'.$frontal |
|
615 | 615 | . '/.well-known/webfinger?resource=http://nextcloud.com/&test=' |
616 | - . $testToken . '"' |
|
616 | + . $testToken.'"' |
|
617 | 617 | ); |
618 | 618 | |
619 | 619 | $output->writeln('paste the result here: '); |
@@ -647,7 +647,7 @@ discard block |
||
647 | 647 | |
648 | 648 | if ($pastedHref !== $href) { |
649 | 649 | $output->writeln( |
650 | - '<error>The returned data (' . $pastedHref . ') are not the one expected: </error>' |
|
650 | + '<error>The returned data ('.$pastedHref.') are not the one expected: </error>' |
|
651 | 651 | . $href |
652 | 652 | ); |
653 | 653 | continue; |
@@ -659,7 +659,7 @@ discard block |
||
659 | 659 | 'Next step, please run this <info>curl</info> command from a remote terminal and paste its result: ' |
660 | 660 | ); |
661 | 661 | $output->writeln( |
662 | - ' curl -L "' . $pastedHref . '?test=' . $testToken . '" -H "Accept: application/json"' |
|
662 | + ' curl -L "'.$pastedHref.'?test='.$testToken.'" -H "Accept: application/json"' |
|
663 | 663 | ); |
664 | 664 | |
665 | 665 | $output->writeln('paste the result here: '); |
@@ -675,9 +675,9 @@ discard block |
||
675 | 675 | || $appSignatory->getRoot() !== $pastedSignatory->g('root')) { |
676 | 676 | $output->writeln( |
677 | 677 | '<error>The returned data (' |
678 | - . $pastedSignatory->g('uid') . '/' . $pastedSignatory->g('root') |
|
678 | + . $pastedSignatory->g('uid').'/'.$pastedSignatory->g('root') |
|
679 | 679 | . ') are not the one expected: </error>' |
680 | - . $appSignatory->getUid(true) . '/' . $appSignatory->getRoot() |
|
680 | + . $appSignatory->getUid(true).'/'.$appSignatory->getRoot() |
|
681 | 681 | ); |
682 | 682 | continue; |
683 | 683 | } |
@@ -703,7 +703,7 @@ discard block |
||
703 | 703 | |
704 | 704 | $output->writeln(''); |
705 | 705 | $question = new ConfirmationQuestion( |
706 | - '- Do you want to save <info>' . $frontal |
|
706 | + '- Do you want to save <info>'.$frontal |
|
707 | 707 | . '</info> as your <info>frontal</info> address ? (y/N) ', |
708 | 708 | false, '/^(y|Y)/i' |
709 | 709 | ); |
@@ -719,7 +719,7 @@ discard block |
||
719 | 719 | $this->configService->setAppValue(ConfigService::FRONTAL_CLOUD_ID, $cloudId); |
720 | 720 | $this->configService->setAppValue(ConfigService::FRONTAL_CLOUD_PATH, $path); |
721 | 721 | |
722 | - $output->writeln('- Address <info>' . $frontal . '</info> is now used as <info>frontal</info>'); |
|
722 | + $output->writeln('- Address <info>'.$frontal.'</info> is now used as <info>frontal</info>'); |
|
723 | 723 | } |
724 | 724 | |
725 | 725 | /** |
@@ -744,7 +744,7 @@ discard block |
||
744 | 744 | $request->setDataSerialize(new SimpleDataStore(['empty' => 1])); |
745 | 745 | } |
746 | 746 | |
747 | - $output->write('- ' . $type . ' request on ' . $request->getCompleteUrl() . ': '); |
|
747 | + $output->write('- '.$type.' request on '.$request->getCompleteUrl().': '); |
|
748 | 748 | |
749 | 749 | try { |
750 | 750 | $this->doRequest($request); |
@@ -755,7 +755,7 @@ discard block |
||
755 | 755 | $color = 'info'; |
756 | 756 | } |
757 | 757 | |
758 | - $output->writeln('<' . $color . '>' . $result->getStatusCode() . '</' . $color . '>'); |
|
758 | + $output->writeln('<'.$color.'>'.$result->getStatusCode().'</'.$color.'>'); |
|
759 | 759 | if ($result->getStatusCode() === 200) { |
760 | 760 | return true; |
761 | 761 | } |
@@ -778,7 +778,7 @@ discard block |
||
778 | 778 | |
779 | 779 | $output->writeln(''); |
780 | 780 | $output->writeln( |
781 | - 'The address <info>' . $address . '</info> seems to reach your local Nextcloud.' |
|
781 | + 'The address <info>'.$address.'</info> seems to reach your local Nextcloud.' |
|
782 | 782 | ); |
783 | 783 | |
784 | 784 | $helper = $this->getHelper('question'); |
@@ -795,8 +795,8 @@ discard block |
||
795 | 795 | |
796 | 796 | $this->configService->setAppValue(ConfigService::FORCE_NC_BASE, $address); |
797 | 797 | $output->writeln( |
798 | - 'New configuration <info>' . Application::APP_ID . '.' . ConfigService::FORCE_NC_BASE . '=\'' |
|
799 | - . $address . '\'</info> stored in database' |
|
798 | + 'New configuration <info>'.Application::APP_ID.'.'.ConfigService::FORCE_NC_BASE.'=\'' |
|
799 | + . $address.'\'</info> stored in database' |
|
800 | 800 | ); |
801 | 801 | } |
802 | 802 | |
@@ -823,7 +823,7 @@ discard block |
||
823 | 823 | $path = rtrim($path, '/'); |
824 | 824 | |
825 | 825 | if (!is_null($cloudIdPort)) { |
826 | - $cloudId = $cloudId . ':' . $cloudIdPort; |
|
826 | + $cloudId = $cloudId.':'.$cloudIdPort; |
|
827 | 827 | } |
828 | 828 | |
829 | 829 | return [$scheme, $cloudId, $path]; |
@@ -87,7 +87,7 @@ |
||
87 | 87 | 'version' => $this->configService->getAppValue('installed_version'), |
88 | 88 | 'api' => Application::APP_API |
89 | 89 | ]; |
90 | - } catch (UnknownInterfaceException|SignatoryException $e) { |
|
90 | + } catch (UnknownInterfaceException | SignatoryException $e) { |
|
91 | 91 | return $response; |
92 | 92 | } |
93 | 93 |
@@ -76,7 +76,7 @@ |
||
76 | 76 | ->setItemsLimit($limit) |
77 | 77 | ->setItemsOffset($since ? (int)$since : 0); |
78 | 78 | |
79 | - $circles = array_map(function (Circle $circle) { |
|
79 | + $circles = array_map(function(Circle $circle) { |
|
80 | 80 | return new WidgetItem( |
81 | 81 | $circle->getDisplayName(), |
82 | 82 | '', |
@@ -59,18 +59,18 @@ discard block |
||
59 | 59 | } |
60 | 60 | |
61 | 61 | $shares = $this->shareByCircleProvider->getSharesToCircle($teamId); |
62 | - usort($shares, function ($a, $b) { |
|
62 | + usort($shares, function($a, $b) { |
|
63 | 63 | return (int)($b->getItemType() === 'folder') - (int)($a->getItemType() === 'folder'); |
64 | 64 | }); |
65 | - return array_map(function (ShareWrapper $shareWrapper) { |
|
65 | + return array_map(function(ShareWrapper $shareWrapper) { |
|
66 | 66 | $isFolder = $shareWrapper->getItemType() === 'folder'; |
67 | 67 | return new TeamResource( |
68 | 68 | $this, |
69 | 69 | (string)$shareWrapper->getFileSource(), |
70 | 70 | basename($shareWrapper->getFileTarget()), |
71 | - $this->urlGenerator->getAbsoluteURL('/index.php/f/' . $shareWrapper->getFileSource()), |
|
71 | + $this->urlGenerator->getAbsoluteURL('/index.php/f/'.$shareWrapper->getFileSource()), |
|
72 | 72 | iconSvg: $isFolder ? '<svg xmlns="http://www.w3.org/2000/svg" id="mdi-folder" viewBox="0 0 24 24"><path d="M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z" /></svg>' : null, |
73 | - iconURL: !$isFolder ? |
|
73 | + iconURL : !$isFolder ? |
|
74 | 74 | $this->urlGenerator->linkToRouteAbsolute('core.preview.getPreviewByFileId', ['fileId' => $shareWrapper->getFileSource(), 'mimeFallback' => true, ]) |
75 | 75 | : null, |
76 | 76 | ); |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | return false; |
83 | 83 | } |
84 | 84 | |
85 | - return count(array_filter($this->getSharedWith($teamId), function (TeamResource $resource) use ($resourceId) { |
|
85 | + return count(array_filter($this->getSharedWith($teamId), function(TeamResource $resource) use ($resourceId) { |
|
86 | 86 | return $resource->getId() === $resourceId; |
87 | 87 | })) !== 0; |
88 | 88 | } |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | |
95 | 95 | $shares = $this->shareByCircleProvider->getSharesByFileId((int)$resourceId); |
96 | 96 | |
97 | - return array_map(function ($share) { |
|
97 | + return array_map(function($share) { |
|
98 | 98 | return $share->getSharedWith(); |
99 | 99 | }, $shares); |
100 | 100 | } |
@@ -125,7 +125,7 @@ |
||
125 | 125 | continue; |
126 | 126 | } |
127 | 127 | |
128 | - $replace['{' . $k . '}'] = $data[$k]['_parsed']; |
|
128 | + $replace['{'.$k.'}'] = $data[$k]['_parsed']; |
|
129 | 129 | } |
130 | 130 | |
131 | 131 | $event->setParsedSubject(strtr($line, $replace)); |
@@ -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 | } |
@@ -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; |
@@ -444,7 +444,7 @@ discard block |
||
444 | 444 | |
445 | 445 | return array_filter( |
446 | 446 | array_map( |
447 | - function (ShareWrapper $wrapper) { |
|
447 | + function(ShareWrapper $wrapper) { |
|
448 | 448 | return $wrapper->getShare($this->rootFolder, $this->userManager, $this->urlGenerator); |
449 | 449 | }, $wrappedShares |
450 | 450 | ) |
@@ -496,7 +496,7 @@ discard block |
||
496 | 496 | |
497 | 497 | return array_filter( |
498 | 498 | array_map( |
499 | - function (ShareWrapper $wrapper) { |
|
499 | + function(ShareWrapper $wrapper) { |
|
500 | 500 | return $wrapper->getShare($this->rootFolder, $this->userManager, $this->urlGenerator); |
501 | 501 | }, $wrappedShares |
502 | 502 | ) |
@@ -545,7 +545,7 @@ discard block |
||
545 | 545 | |
546 | 546 | return array_filter( |
547 | 547 | array_map( |
548 | - function (ShareWrapper $wrapper) { |
|
548 | + function(ShareWrapper $wrapper) { |
|
549 | 549 | return $wrapper->getShare( |
550 | 550 | $this->rootFolder, $this->userManager, $this->urlGenerator, true |
551 | 551 | ); |
@@ -576,7 +576,7 @@ discard block |
||
576 | 576 | |
577 | 577 | $share = $wrappedShare->getShare($this->rootFolder, $this->userManager, $this->urlGenerator); |
578 | 578 | if ($share->getPassword() !== '') { |
579 | - $this->logger->notice('share is protected by a password, hash: ' . $share->getPassword()); |
|
579 | + $this->logger->notice('share is protected by a password, hash: '.$share->getPassword()); |
|
580 | 580 | } |
581 | 581 | |
582 | 582 | return $share; |
@@ -686,7 +686,7 @@ discard block |
||
686 | 686 | ]; |
687 | 687 | } else { |
688 | 688 | // we only store temp value, as token is unknown at this point |
689 | - $remote[$member->getUserid() . '@' . $member->getInstance()] = [ |
|
689 | + $remote[$member->getUserid().'@'.$member->getInstance()] = [ |
|
690 | 690 | 'node_id' => $share->getFileSource(), |
691 | 691 | 'shareId' => $share->getId(), |
692 | 692 | 'memberId' => $member->getId(), |
@@ -776,7 +776,7 @@ discard block |
||
776 | 776 | */ |
777 | 777 | private function updateAccessListTokens(array $list, array $shareTokens): array { |
778 | 778 | $result = []; |
779 | - foreach($list as $id => $data) { |
|
779 | + foreach ($list as $id => $data) { |
|
780 | 780 | $result[$id] = [ |
781 | 781 | 'node_id' => $data['node_id'], |
782 | 782 | 'token' => $shareTokens[$data['shareId']][$data['memberId']] |
@@ -218,13 +218,13 @@ |
||
218 | 218 | |
219 | 219 | private function generateIncrementedMountpoint(Folder $fs, Mount $mount, IFederatedUser $federatedUser): void { |
220 | 220 | $info = pathinfo($mount->getMountPoint()); |
221 | - $filename = rtrim($this->get('dirname', $info), '/') . '/' . $this->get('filename', $info); |
|
221 | + $filename = rtrim($this->get('dirname', $info), '/').'/'.$this->get('filename', $info); |
|
222 | 222 | $extension = $this->get('extension', $info); |
223 | - $extension = ($extension === '') ? '' : '.' . $extension; |
|
223 | + $extension = ($extension === '') ? '' : '.'.$extension; |
|
224 | 224 | |
225 | 225 | $n = 2; |
226 | 226 | while (true) { |
227 | - $path = $filename . " ($n)" . $extension; |
|
227 | + $path = $filename." ($n)".$extension; |
|
228 | 228 | try { |
229 | 229 | $fs->get($path); |
230 | 230 | } catch (NotFoundException) { |