@@ -155,7 +155,7 @@ |
||
| 155 | 155 | } |
| 156 | 156 | |
| 157 | 157 | public function supportedEntities(): array { |
| 158 | - return [ File::class ]; |
|
| 158 | + return [File::class]; |
|
| 159 | 159 | } |
| 160 | 160 | |
| 161 | 161 | public function isAvailableForScope(int $scope): bool { |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | protected function renderScript($appName, $scriptName) { |
| 115 | 115 | $content = ''; |
| 116 | 116 | $appPath = \OC_App::getAppPath($appName); |
| 117 | - $scriptPath = $appPath . '/' . $scriptName; |
|
| 117 | + $scriptPath = $appPath.'/'.$scriptName; |
|
| 118 | 118 | if (file_exists($scriptPath)) { |
| 119 | 119 | // TODO: sanitize path / script name ? |
| 120 | 120 | ob_start(); |
@@ -248,7 +248,7 @@ discard block |
||
| 248 | 248 | $nav->assign('quota', $storageInfo['quota']); |
| 249 | 249 | $nav->assign('usage_relative', $storageInfo['relative']); |
| 250 | 250 | |
| 251 | - $nav->assign('webdav_url', \OCP\Util::linkToRemote('dav/files/' . $user)); |
|
| 251 | + $nav->assign('webdav_url', \OCP\Util::linkToRemote('dav/files/'.$user)); |
|
| 252 | 252 | |
| 253 | 253 | $contentItems = []; |
| 254 | 254 | |
@@ -290,8 +290,8 @@ discard block |
||
| 290 | 290 | $params['allowShareWithLink'] = $this->config->getAppValue('core', 'shareapi_allow_links', 'yes'); |
| 291 | 291 | $params['defaultFileSorting'] = $this->config->getUserValue($user, 'files', 'file_sorting', 'name'); |
| 292 | 292 | $params['defaultFileSortingDirection'] = $this->config->getUserValue($user, 'files', 'file_sorting_direction', 'asc'); |
| 293 | - $params['showgridview'] = $this->config->getUserValue($user, 'files', 'show_grid', false); |
|
| 294 | - $params['isIE'] = \OCP\Util::isIE(); |
|
| 293 | + $params['showgridview'] = $this->config->getUserValue($user, 'files', 'show_grid', false); |
|
| 294 | + $params['isIE'] = \OCP\Util::isIE(); |
|
| 295 | 295 | $showHidden = (bool) $this->config->getUserValue($this->userSession->getUser()->getUID(), 'files', 'show_hidden', false); |
| 296 | 296 | $params['showHiddenFiles'] = $showHidden ? 1 : 0; |
| 297 | 297 | $params['fileNotFound'] = $fileNotFound ? 1 : 0; |
@@ -325,7 +325,7 @@ discard block |
||
| 325 | 325 | $params = []; |
| 326 | 326 | |
| 327 | 327 | if (empty($files) && $this->appManager->isEnabledForUser('files_trashbin')) { |
| 328 | - $baseFolder = $this->rootFolder->get($uid . '/files_trashbin/files/'); |
|
| 328 | + $baseFolder = $this->rootFolder->get($uid.'/files_trashbin/files/'); |
|
| 329 | 329 | $files = $baseFolder->getById($fileId); |
| 330 | 330 | $params['view'] = 'trashbin'; |
| 331 | 331 | } |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | if (isset($jsonBlob['ncversion']) && $jsonBlob['ncversion'] === $this->getVersion()) { |
| 154 | 154 | |
| 155 | 155 | // If the timestamp is older than 300 seconds request the files new |
| 156 | - if ((int)$jsonBlob['timestamp'] > ($this->timeFactory->getTime() - self::INVALIDATE_AFTER_SECONDS)) { |
|
| 156 | + if ((int) $jsonBlob['timestamp'] > ($this->timeFactory->getTime() - self::INVALIDATE_AFTER_SECONDS)) { |
|
| 157 | 157 | return $jsonBlob['data']; |
| 158 | 158 | } |
| 159 | 159 | |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | $file->putContent(json_encode($responseJson)); |
| 175 | 175 | return json_decode($file->getContent(), true)['data']; |
| 176 | 176 | } catch (ConnectException $e) { |
| 177 | - $this->logger->warning('Could not connect to appstore: ' . $e->getMessage(), ['app' => 'appstoreFetcher']); |
|
| 177 | + $this->logger->warning('Could not connect to appstore: '.$e->getMessage(), ['app' => 'appstoreFetcher']); |
|
| 178 | 178 | return []; |
| 179 | 179 | } catch (\Exception $e) { |
| 180 | 180 | $this->logger->logException($e, ['app' => 'appstoreFetcher', 'level' => ILogger::WARN]); |
@@ -221,6 +221,6 @@ discard block |
||
| 221 | 221 | } |
| 222 | 222 | |
| 223 | 223 | protected function getEndpoint(): string { |
| 224 | - return $this->config->getSystemValue('appstoreurl', 'https://apps.nextcloud.com/api/v1') . '/' . $this->endpointName; |
|
| 224 | + return $this->config->getSystemValue('appstoreurl', 'https://apps.nextcloud.com/api/v1').'/'.$this->endpointName; |
|
| 225 | 225 | } |
| 226 | 226 | } |
@@ -106,12 +106,12 @@ |
||
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | return [ |
| 109 | - 'providers' => array_map(function (IProvidesPersonalSettings $provider) use ($user) { |
|
| 109 | + 'providers' => array_map(function(IProvidesPersonalSettings $provider) use ($user) { |
|
| 110 | 110 | return [ |
| 111 | 111 | 'provider' => $provider, |
| 112 | 112 | 'settings' => $provider->getPersonalSettings($user) |
| 113 | 113 | ]; |
| 114 | - }, array_filter($this->providerLoader->getProviders($user), function (IProvider $provider) { |
|
| 114 | + }, array_filter($this->providerLoader->getProviders($user), function(IProvider $provider) { |
|
| 115 | 115 | return $provider instanceof IProvidesPersonalSettings; |
| 116 | 116 | })) |
| 117 | 117 | ]; |
@@ -25,11 +25,11 @@ |
||
| 25 | 25 | ?> |
| 26 | 26 | |
| 27 | 27 | <div id="two-factor-auth" class="section"> |
| 28 | - <h2><?php p($l->t('Two-Factor Authentication'));?></h2> |
|
| 28 | + <h2><?php p($l->t('Two-Factor Authentication')); ?></h2> |
|
| 29 | 29 | <a target="_blank" rel="noreferrer noopener" class="icon-info" |
| 30 | - title="<?php p($l->t('Open documentation'));?>" |
|
| 30 | + title="<?php p($l->t('Open documentation')); ?>" |
|
| 31 | 31 | href="<?php p(link_to_docs('user-2fa')); ?>"></a> |
| 32 | - <p class="settings-hint"><?php p($l->t('Use a second factor besides your password to increase security for your account.'));?></p> |
|
| 32 | + <p class="settings-hint"><?php p($l->t('Use a second factor besides your password to increase security for your account.')); ?></p> |
|
| 33 | 33 | <ul> |
| 34 | 34 | <?php foreach ($_['twoFactorProviderData']['providers'] as $data) { ?> |
| 35 | 35 | <li> |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | * @return ILinkAction |
| 51 | 51 | */ |
| 52 | 52 | public function newEMailAction($icon, $name, $email) { |
| 53 | - return $this->newLinkAction($icon, $name, 'mailto:' . $email); |
|
| 53 | + return $this->newLinkAction($icon, $name, 'mailto:'.$email); |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | } |
@@ -57,17 +57,17 @@ |
||
| 57 | 57 | |
| 58 | 58 | try { |
| 59 | 59 | $jobStartTime = time(); |
| 60 | - $logger->debug('Run ' . get_class($this) . ' job with ID ' . $this->getId(), ['app' => 'cron']); |
|
| 60 | + $logger->debug('Run '.get_class($this).' job with ID '.$this->getId(), ['app' => 'cron']); |
|
| 61 | 61 | $this->run($this->argument); |
| 62 | 62 | $timeTaken = time() - $jobStartTime; |
| 63 | 63 | |
| 64 | - $logger->debug('Finished ' . get_class($this) . ' job with ID ' . $this->getId() . ' in ' . $timeTaken . ' seconds', ['app' => 'cron']); |
|
| 64 | + $logger->debug('Finished '.get_class($this).' job with ID '.$this->getId().' in '.$timeTaken.' seconds', ['app' => 'cron']); |
|
| 65 | 65 | $jobList->setExecutionTime($this, $timeTaken); |
| 66 | 66 | } catch (\Throwable $e) { |
| 67 | 67 | if ($logger) { |
| 68 | 68 | $logger->logException($e, [ |
| 69 | 69 | 'app' => 'core', |
| 70 | - 'message' => 'Error while running background job (class: ' . get_class($this) . ', arguments: ' . print_r($this->argument, true) . ')' |
|
| 70 | + 'message' => 'Error while running background job (class: '.get_class($this).', arguments: '.print_r($this->argument, true).')' |
|
| 71 | 71 | ]); |
| 72 | 72 | } |
| 73 | 73 | } |
@@ -90,12 +90,12 @@ discard block |
||
| 90 | 90 | $destinationUserObject = $this->userManager->get($input->getArgument('destination-user')); |
| 91 | 91 | |
| 92 | 92 | if (!$sourceUserObject instanceof IUser) { |
| 93 | - $output->writeln("<error>Unknown source user " . $input->getArgument('source-user') . "</error>"); |
|
| 93 | + $output->writeln("<error>Unknown source user ".$input->getArgument('source-user')."</error>"); |
|
| 94 | 94 | return 1; |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | if (!$destinationUserObject instanceof IUser) { |
| 98 | - $output->writeln("<error>Unknown destination user " . $input->getArgument('destination-user') . "</error>"); |
|
| 98 | + $output->writeln("<error>Unknown destination user ".$input->getArgument('destination-user')."</error>"); |
|
| 99 | 99 | return 1; |
| 100 | 100 | } |
| 101 | 101 | |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | $input->getOption('move') === true |
| 109 | 109 | ); |
| 110 | 110 | } catch (TransferOwnershipException $e) { |
| 111 | - $output->writeln("<error>" . $e->getMessage() . "</error>"); |
|
| 111 | + $output->writeln("<error>".$e->getMessage()."</error>"); |
|
| 112 | 112 | return $e->getCode() !== 0 ? $e->getCode() : 1; |
| 113 | 113 | } |
| 114 | 114 | |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | $output = $output ?? new NullOutput(); |
| 86 | 86 | $sourceUid = $sourceUser->getUID(); |
| 87 | 87 | $destinationUid = $destinationUser->getUID(); |
| 88 | - $sourcePath = rtrim($sourceUid . '/files/' . $path, '/'); |
|
| 88 | + $sourcePath = rtrim($sourceUid.'/files/'.$path, '/'); |
|
| 89 | 89 | |
| 90 | 90 | // target user has to be ready |
| 91 | 91 | if ($destinationUser->getLastLogin() === 0 || !$this->encryptionManager->isReadyForUser($destinationUid)) { |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | OutputInterface $output): void { |
| 176 | 176 | $output->writeln('Validating quota'); |
| 177 | 177 | $size = $view->getFileInfo($sourcePath, false)->getSize(false); |
| 178 | - $freeSpace = $view->free_space($destinationUid . '/files/'); |
|
| 178 | + $freeSpace = $view->free_space($destinationUid.'/files/'); |
|
| 179 | 179 | if ($size > $freeSpace) { |
| 180 | 180 | $output->writeln('<error>Target user does not have enough free space available.</error>'); |
| 181 | 181 | throw new \Exception('Execution terminated.'); |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | |
| 188 | 188 | $encryptedFiles = []; |
| 189 | 189 | $this->walkFiles($view, $sourcePath, |
| 190 | - function (FileInfo $fileInfo) use ($progress) { |
|
| 190 | + function(FileInfo $fileInfo) use ($progress) { |
|
| 191 | 191 | if ($fileInfo->getType() === FileInfo::TYPE_FOLDER) { |
| 192 | 192 | // only analyze into folders from main storage, |
| 193 | 193 | if (!$fileInfo->getStorage()->instanceOfStorage(IHomeStorage::class)) { |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | $output->writeln("<error>Some files are encrypted - please decrypt them first.</error>"); |
| 210 | 210 | foreach ($encryptedFiles as $encryptedFile) { |
| 211 | 211 | /** @var FileInfo $encryptedFile */ |
| 212 | - $output->writeln(" " . $encryptedFile->getPath()); |
|
| 212 | + $output->writeln(" ".$encryptedFile->getPath()); |
|
| 213 | 213 | } |
| 214 | 214 | throw new \Exception('Execution terminated.'); |
| 215 | 215 | } |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | // Else only the content inside folder is transferred which is not correct. |
| 254 | 254 | if ($sourcePath !== "$sourceUid/files") { |
| 255 | 255 | $view->mkdir($finalTarget); |
| 256 | - $finalTarget = $finalTarget . '/' . basename($sourcePath); |
|
| 256 | + $finalTarget = $finalTarget.'/'.basename($sourcePath); |
|
| 257 | 257 | } |
| 258 | 258 | if ($view->rename($sourcePath, $finalTarget) === false) { |
| 259 | 259 | throw new TransferOwnershipException("Could not transfer files.", 1); |
@@ -276,7 +276,7 @@ discard block |
||
| 276 | 276 | if ($share->getShareType() === \OCP\Share::SHARE_TYPE_USER && |
| 277 | 277 | $share->getSharedWith() === $destinationUid) { |
| 278 | 278 | // Unmount the shares before deleting, so we don't try to get the storage later on. |
| 279 | - $shareMountPoint = $this->mountManager->find('/' . $destinationUid . '/files' . $share->getTarget()); |
|
| 279 | + $shareMountPoint = $this->mountManager->find('/'.$destinationUid.'/files'.$share->getTarget()); |
|
| 280 | 280 | if ($shareMountPoint) { |
| 281 | 281 | $this->mountManager->removeMount($shareMountPoint->getMountPoint()); |
| 282 | 282 | } |
@@ -292,9 +292,9 @@ discard block |
||
| 292 | 292 | $this->shareManager->updateShare($share); |
| 293 | 293 | } |
| 294 | 294 | } catch (\OCP\Files\NotFoundException $e) { |
| 295 | - $output->writeln('<error>Share with id ' . $share->getId() . ' points at deleted file, skipping</error>'); |
|
| 295 | + $output->writeln('<error>Share with id '.$share->getId().' points at deleted file, skipping</error>'); |
|
| 296 | 296 | } catch (\Throwable $e) { |
| 297 | - $output->writeln('<error>Could not restore share with id ' . $share->getId() . ':' . $e->getTraceAsString() . '</error>'); |
|
| 297 | + $output->writeln('<error>Could not restore share with id '.$share->getId().':'.$e->getTraceAsString().'</error>'); |
|
| 298 | 298 | } |
| 299 | 299 | $progress->advance(); |
| 300 | 300 | } |