@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | $path = basename($fullPath); |
111 | 111 | |
112 | 112 | if ($normalizedPath !== $path) { |
113 | - $output->writeln("\t<error>Entry \"" . $fullPath . '" will not be accessible due to incompatible encoding</error>'); |
|
113 | + $output->writeln("\t<error>Entry \"".$fullPath.'" will not be accessible due to incompatible encoding</error>'); |
|
114 | 114 | } |
115 | 115 | } |
116 | 116 | |
@@ -120,27 +120,27 @@ discard block |
||
120 | 120 | |
121 | 121 | # check on each file/folder if there was a user interrupt (ctrl-c) and throw an exception |
122 | 122 | |
123 | - $scanner->listen('\OC\Files\Utils\Scanner', 'scanFile', function ($path) use ($output) { |
|
123 | + $scanner->listen('\OC\Files\Utils\Scanner', 'scanFile', function($path) use ($output) { |
|
124 | 124 | $output->writeln("\tFile\t<info>$path</info>", OutputInterface::VERBOSITY_VERBOSE); |
125 | 125 | ++$this->filesCounter; |
126 | 126 | $this->abortIfInterrupted(); |
127 | 127 | }); |
128 | 128 | |
129 | - $scanner->listen('\OC\Files\Utils\Scanner', 'scanFolder', function ($path) use ($output) { |
|
129 | + $scanner->listen('\OC\Files\Utils\Scanner', 'scanFolder', function($path) use ($output) { |
|
130 | 130 | $output->writeln("\tFolder\t<info>$path</info>", OutputInterface::VERBOSITY_VERBOSE); |
131 | 131 | ++$this->foldersCounter; |
132 | 132 | $this->abortIfInterrupted(); |
133 | 133 | }); |
134 | 134 | |
135 | - $scanner->listen('\OC\Files\Utils\Scanner', 'StorageNotAvailable', function (StorageNotAvailableException $e) use ($output) { |
|
136 | - $output->writeln('Error while scanning, storage not available (' . $e->getMessage() . ')', OutputInterface::VERBOSITY_VERBOSE); |
|
135 | + $scanner->listen('\OC\Files\Utils\Scanner', 'StorageNotAvailable', function(StorageNotAvailableException $e) use ($output) { |
|
136 | + $output->writeln('Error while scanning, storage not available ('.$e->getMessage().')', OutputInterface::VERBOSITY_VERBOSE); |
|
137 | 137 | }); |
138 | 138 | |
139 | - $scanner->listen('\OC\Files\Utils\Scanner', 'scanFile', function ($path) use ($output) { |
|
139 | + $scanner->listen('\OC\Files\Utils\Scanner', 'scanFile', function($path) use ($output) { |
|
140 | 140 | $this->checkScanWarning($path, $output); |
141 | 141 | }); |
142 | 142 | |
143 | - $scanner->listen('\OC\Files\Utils\Scanner', 'scanFolder', function ($path) use ($output) { |
|
143 | + $scanner->listen('\OC\Files\Utils\Scanner', 'scanFolder', function($path) use ($output) { |
|
144 | 144 | $this->checkScanWarning($path, $output); |
145 | 145 | }); |
146 | 146 | |
@@ -157,10 +157,10 @@ discard block |
||
157 | 157 | # exit the function if ctrl-c has been pressed |
158 | 158 | $output->writeln('Interrupted by user'); |
159 | 159 | } catch (NotFoundException $e) { |
160 | - $output->writeln('<error>Path not found: ' . $e->getMessage() . '</error>'); |
|
160 | + $output->writeln('<error>Path not found: '.$e->getMessage().'</error>'); |
|
161 | 161 | } catch (\Exception $e) { |
162 | - $output->writeln('<error>Exception during scan: ' . $e->getMessage() . '</error>'); |
|
163 | - $output->writeln('<error>' . $e->getTraceAsString() . '</error>'); |
|
162 | + $output->writeln('<error>Exception during scan: '.$e->getMessage().'</error>'); |
|
163 | + $output->writeln('<error>'.$e->getTraceAsString().'</error>'); |
|
164 | 164 | } |
165 | 165 | } |
166 | 166 | |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | protected function execute(InputInterface $input, OutputInterface $output): int { |
173 | 173 | $inputPath = $input->getOption('path'); |
174 | 174 | if ($inputPath) { |
175 | - $inputPath = '/' . trim($inputPath, '/'); |
|
175 | + $inputPath = '/'.trim($inputPath, '/'); |
|
176 | 176 | list(, $user,) = explode('/', $inputPath, 3); |
177 | 177 | $users = [$user]; |
178 | 178 | } elseif ($input->getOption('all')) { |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | if (is_object($user)) { |
201 | 201 | $user = $user->getUID(); |
202 | 202 | } |
203 | - $path = $inputPath ? $inputPath : '/' . $user; |
|
203 | + $path = $inputPath ? $inputPath : '/'.$user; |
|
204 | 204 | ++$user_count; |
205 | 205 | if ($this->userManager->userExists($user)) { |
206 | 206 | $output->writeln("Starting scan for user $user_count out of $users_total ($user)"); |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | protected function formatExecTime() { |
299 | 299 | $secs = round($this->execTime); |
300 | 300 | # convert seconds into HH:MM:SS form |
301 | - return sprintf('%02d:%02d:%02d', ($secs/3600), ($secs/60%60), $secs%60); |
|
301 | + return sprintf('%02d:%02d:%02d', ($secs / 3600), ($secs / 60 % 60), $secs % 60); |
|
302 | 302 | } |
303 | 303 | |
304 | 304 | /** |
@@ -59,9 +59,9 @@ |
||
59 | 59 | protected function execute(InputInterface $input, OutputInterface $output): int { |
60 | 60 | $progress = new ProgressBar($output); |
61 | 61 | $progress->start(); |
62 | - $this->syncService->syncThemAll(function ($url, $ex) use ($progress, $output) { |
|
62 | + $this->syncService->syncThemAll(function($url, $ex) use ($progress, $output) { |
|
63 | 63 | if ($ex instanceof \Exception) { |
64 | - $output->writeln("Error while syncing $url : " . $ex->getMessage()); |
|
64 | + $output->writeln("Error while syncing $url : ".$ex->getMessage()); |
|
65 | 65 | } else { |
66 | 66 | $progress->advance(); |
67 | 67 | } |