@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | $path = basename($fullPath); |
| 106 | 106 | |
| 107 | 107 | if ($normalizedPath !== $path) { |
| 108 | - $output->writeln("\t<error>Entry \"" . $fullPath . '" will not be accessible due to incompatible encoding</error>'); |
|
| 108 | + $output->writeln("\t<error>Entry \"".$fullPath.'" will not be accessible due to incompatible encoding</error>'); |
|
| 109 | 109 | } |
| 110 | 110 | } |
| 111 | 111 | |
@@ -115,42 +115,42 @@ discard block |
||
| 115 | 115 | # check on each file/folder if there was a user interrupt (ctrl-c) and throw an exception |
| 116 | 116 | # printout and count |
| 117 | 117 | if ($verbose) { |
| 118 | - $scanner->listen('\OC\Files\Utils\Scanner', 'scanFile', function ($path) use ($output) { |
|
| 118 | + $scanner->listen('\OC\Files\Utils\Scanner', 'scanFile', function($path) use ($output) { |
|
| 119 | 119 | $output->writeln("\tFile <info>$path</info>"); |
| 120 | 120 | $this->filesCounter += 1; |
| 121 | 121 | if ($this->hasBeenInterrupted()) { |
| 122 | 122 | throw new InterruptedException(); |
| 123 | 123 | } |
| 124 | 124 | }); |
| 125 | - $scanner->listen('\OC\Files\Utils\Scanner', 'scanFolder', function ($path) use ($output) { |
|
| 125 | + $scanner->listen('\OC\Files\Utils\Scanner', 'scanFolder', function($path) use ($output) { |
|
| 126 | 126 | $output->writeln("\tFolder <info>$path</info>"); |
| 127 | 127 | $this->foldersCounter += 1; |
| 128 | 128 | if ($this->hasBeenInterrupted()) { |
| 129 | 129 | throw new InterruptedException(); |
| 130 | 130 | } |
| 131 | 131 | }); |
| 132 | - $scanner->listen('\OC\Files\Utils\Scanner', 'StorageNotAvailable', function (StorageNotAvailableException $e) use ($output) { |
|
| 133 | - $output->writeln("Error while scanning, storage not available (" . $e->getMessage() . ")"); |
|
| 132 | + $scanner->listen('\OC\Files\Utils\Scanner', 'StorageNotAvailable', function(StorageNotAvailableException $e) use ($output) { |
|
| 133 | + $output->writeln("Error while scanning, storage not available (".$e->getMessage().")"); |
|
| 134 | 134 | }); |
| 135 | 135 | # count only |
| 136 | 136 | } else { |
| 137 | - $scanner->listen('\OC\Files\Utils\Scanner', 'scanFile', function () use ($output) { |
|
| 137 | + $scanner->listen('\OC\Files\Utils\Scanner', 'scanFile', function() use ($output) { |
|
| 138 | 138 | $this->filesCounter += 1; |
| 139 | 139 | if ($this->hasBeenInterrupted()) { |
| 140 | 140 | throw new InterruptedException(); |
| 141 | 141 | } |
| 142 | 142 | }); |
| 143 | - $scanner->listen('\OC\Files\Utils\Scanner', 'scanFolder', function () use ($output) { |
|
| 143 | + $scanner->listen('\OC\Files\Utils\Scanner', 'scanFolder', function() use ($output) { |
|
| 144 | 144 | $this->foldersCounter += 1; |
| 145 | 145 | if ($this->hasBeenInterrupted()) { |
| 146 | 146 | throw new InterruptedException(); |
| 147 | 147 | } |
| 148 | 148 | }); |
| 149 | 149 | } |
| 150 | - $scanner->listen('\OC\Files\Utils\Scanner', 'scanFile', function ($path) use ($output) { |
|
| 150 | + $scanner->listen('\OC\Files\Utils\Scanner', 'scanFile', function($path) use ($output) { |
|
| 151 | 151 | $this->checkScanWarning($path, $output); |
| 152 | 152 | }); |
| 153 | - $scanner->listen('\OC\Files\Utils\Scanner', 'scanFolder', function ($path) use ($output) { |
|
| 153 | + $scanner->listen('\OC\Files\Utils\Scanner', 'scanFolder', function($path) use ($output) { |
|
| 154 | 154 | $this->checkScanWarning($path, $output); |
| 155 | 155 | }); |
| 156 | 156 | |
@@ -167,10 +167,10 @@ discard block |
||
| 167 | 167 | # exit the function if ctrl-c has been pressed |
| 168 | 168 | $output->writeln('Interrupted by user'); |
| 169 | 169 | } catch (NotFoundException $e) { |
| 170 | - $output->writeln('<error>Path not found: ' . $e->getMessage() . '</error>'); |
|
| 170 | + $output->writeln('<error>Path not found: '.$e->getMessage().'</error>'); |
|
| 171 | 171 | } catch (\Exception $e) { |
| 172 | - $output->writeln('<error>Exception during scan: ' . $e->getMessage() . '</error>'); |
|
| 173 | - $output->writeln('<error>' . $e->getTraceAsString() . '</error>'); |
|
| 172 | + $output->writeln('<error>Exception during scan: '.$e->getMessage().'</error>'); |
|
| 173 | + $output->writeln('<error>'.$e->getTraceAsString().'</error>'); |
|
| 174 | 174 | } |
| 175 | 175 | } |
| 176 | 176 | |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | protected function execute(InputInterface $input, OutputInterface $output) { |
| 179 | 179 | $inputPath = $input->getOption('path'); |
| 180 | 180 | if ($inputPath) { |
| 181 | - $inputPath = '/' . trim($inputPath, '/'); |
|
| 181 | + $inputPath = '/'.trim($inputPath, '/'); |
|
| 182 | 182 | list (, $user,) = explode('/', $inputPath, 3); |
| 183 | 183 | $users = array($user); |
| 184 | 184 | } else if ($input->getOption('all')) { |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | if (is_object($user)) { |
| 223 | 223 | $user = $user->getUID(); |
| 224 | 224 | } |
| 225 | - $path = $inputPath ? $inputPath : '/' . $user; |
|
| 225 | + $path = $inputPath ? $inputPath : '/'.$user; |
|
| 226 | 226 | $user_count += 1; |
| 227 | 227 | if ($this->userManager->userExists($user)) { |
| 228 | 228 | # add an extra line when verbose is set to optical separate users |