@@ -168,7 +168,7 @@ |
||
| 168 | 168 | public function registerFilesNavigation() { |
| 169 | 169 | $appManager = FilesApp::getNavigationManager(); |
| 170 | 170 | $appManager->add( |
| 171 | - function () { |
|
| 171 | + function() { |
|
| 172 | 172 | $l = OC::$server->getL10N('circles'); |
| 173 | 173 | |
| 174 | 174 | return [ |
@@ -456,7 +456,7 @@ discard block |
||
| 456 | 456 | } |
| 457 | 457 | |
| 458 | 458 | $path = $this->getPath(); |
| 459 | - [$storageType,] = explode('::', $this->getStorage(), 2); |
|
| 459 | + [$storageType, ] = explode('::', $this->getStorage(), 2); |
|
| 460 | 460 | |
| 461 | 461 | if ($path === '') { |
| 462 | 462 | // we only accept empty path on external storage |
@@ -508,29 +508,29 @@ discard block |
||
| 508 | 508 | * @throws FileCacheNotFoundException |
| 509 | 509 | */ |
| 510 | 510 | public function importFromDatabase(array $data, string $prefix = ''): IQueryRow { |
| 511 | - if ($this->getInt($prefix . 'fileid', $data) === 0) { |
|
| 511 | + if ($this->getInt($prefix.'fileid', $data) === 0) { |
|
| 512 | 512 | throw new FileCacheNotFoundException(); |
| 513 | 513 | } |
| 514 | 514 | |
| 515 | - $this->setId($this->getInt($prefix . 'fileid', $data)); |
|
| 516 | - $this->setPath($this->get($prefix . 'path', $data)); |
|
| 517 | - $this->setPermissions($this->getInt($prefix . 'permissions', $data)); |
|
| 518 | - $this->setStorageId($this->getInt($prefix . 'storage', $data)); |
|
| 519 | - $this->setPathHash($this->get($prefix . 'path_hash', $data)); |
|
| 520 | - $this->setParent($this->getInt($prefix . 'parent', $data)); |
|
| 521 | - $this->setName($this->get($prefix . 'name', $data)); |
|
| 522 | - $this->setMimeType($this->getInt($prefix . 'mimetype', $data)); |
|
| 523 | - $this->setMimePart($this->getInt($prefix . 'mimepart', $data)); |
|
| 524 | - $this->setSize($this->getInt($prefix . 'size', $data)); |
|
| 525 | - $this->setMTime($this->getInt($prefix . 'mtime', $data)); |
|
| 526 | - $this->setStorageMTime($this->getInt($prefix . 'storage_mtime', $data)); |
|
| 527 | - $this->setEncrypted($this->getBool($prefix . 'encrypted', $data)); |
|
| 528 | - $this->setUnencryptedSize($this->getInt($prefix . 'unencrypted_size', $data)); |
|
| 529 | - $this->setEtag($this->get($prefix . 'etag', $data)); |
|
| 530 | - $this->setChecksum($this->get($prefix . 'checksum', $data)); |
|
| 515 | + $this->setId($this->getInt($prefix.'fileid', $data)); |
|
| 516 | + $this->setPath($this->get($prefix.'path', $data)); |
|
| 517 | + $this->setPermissions($this->getInt($prefix.'permissions', $data)); |
|
| 518 | + $this->setStorageId($this->getInt($prefix.'storage', $data)); |
|
| 519 | + $this->setPathHash($this->get($prefix.'path_hash', $data)); |
|
| 520 | + $this->setParent($this->getInt($prefix.'parent', $data)); |
|
| 521 | + $this->setName($this->get($prefix.'name', $data)); |
|
| 522 | + $this->setMimeType($this->getInt($prefix.'mimetype', $data)); |
|
| 523 | + $this->setMimePart($this->getInt($prefix.'mimepart', $data)); |
|
| 524 | + $this->setSize($this->getInt($prefix.'size', $data)); |
|
| 525 | + $this->setMTime($this->getInt($prefix.'mtime', $data)); |
|
| 526 | + $this->setStorageMTime($this->getInt($prefix.'storage_mtime', $data)); |
|
| 527 | + $this->setEncrypted($this->getBool($prefix.'encrypted', $data)); |
|
| 528 | + $this->setUnencryptedSize($this->getInt($prefix.'unencrypted_size', $data)); |
|
| 529 | + $this->setEtag($this->get($prefix.'etag', $data)); |
|
| 530 | + $this->setChecksum($this->get($prefix.'checksum', $data)); |
|
| 531 | 531 | |
| 532 | 532 | // small hack as there is no reason to call a recursive method for a single entry from the table |
| 533 | - $this->setStorage($this->get($prefix . CoreQueryBuilder::STORAGES . '_id', $data)); |
|
| 533 | + $this->setStorage($this->get($prefix.CoreQueryBuilder::STORAGES.'_id', $data)); |
|
| 534 | 534 | |
| 535 | 535 | return $this; |
| 536 | 536 | } |
@@ -75,7 +75,7 @@ |
||
| 75 | 75 | $event->setSubject('circle_create', ['circle' => json_encode($circle)]); |
| 76 | 76 | |
| 77 | 77 | $this->userManager->callForSeenUsers( |
| 78 | - function ($user) use ($event) { |
|
| 78 | + function($user) use ($event) { |
|
| 79 | 79 | /** @var IUser $user */ |
| 80 | 80 | $this->publishEvent($event, [$user]); |
| 81 | 81 | } |
@@ -184,8 +184,8 @@ |
||
| 184 | 184 | $qb->filterCircles(CoreQueryBuilder::CIRCLE, $probe); |
| 185 | 185 | if (!is_null($initiator)) { |
| 186 | 186 | $qb->limitToInitiator(CoreQueryBuilder::CIRCLE, $initiator); |
| 187 | - $qb->orderBy($qb->generateAlias(CoreQueryBuilder::CIRCLE, CoreQueryBuilder::INITIATOR) . '.level', 'desc'); |
|
| 188 | - $qb->addOrderBy(CoreQueryBuilder::CIRCLE . '.display_name', 'asc'); |
|
| 187 | + $qb->orderBy($qb->generateAlias(CoreQueryBuilder::CIRCLE, CoreQueryBuilder::INITIATOR).'.level', 'desc'); |
|
| 188 | + $qb->addOrderBy(CoreQueryBuilder::CIRCLE.'.display_name', 'asc'); |
|
| 189 | 189 | } |
| 190 | 190 | if ($probe->hasFilterMember()) { |
| 191 | 191 | $qb->limitToDirectMembership(CoreQueryBuilder::CIRCLE, $probe->getFilterMember()); |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | $this->parseAsNonMember($event, $circle); |
| 69 | 69 | $this->parseAsMember($event, $circle, $params); |
| 70 | 70 | $this->parseAsModerator($event, $circle, $params); |
| 71 | - } catch (FakeException|InvalidItemException $e) { |
|
| 71 | + } catch (FakeException | InvalidItemException $e) { |
|
| 72 | 72 | /** clean exit */ |
| 73 | 73 | } |
| 74 | 74 | |
@@ -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 | } |