@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | $path = basename($fullPath); |
70 | 70 | |
71 | 71 | if ($normalizedPath !== $path) { |
72 | - $output->writeln("\t<error>Entry \"" . $fullPath . '" will not be accessible due to incompatible encoding</error>'); |
|
72 | + $output->writeln("\t<error>Entry \"".$fullPath.'" will not be accessible due to incompatible encoding</error>'); |
|
73 | 73 | } |
74 | 74 | } |
75 | 75 | |
@@ -85,27 +85,27 @@ discard block |
||
85 | 85 | $scanner = new \OC\Files\Utils\Scanner(null, $connection, \OC::$server->getLogger()); |
86 | 86 | |
87 | 87 | # check on each file/folder if there was a user interrupt (ctrl-c) and throw an exception |
88 | - $scanner->listen('\OC\Files\Utils\Scanner', 'scanFile', function ($path) use ($output) { |
|
88 | + $scanner->listen('\OC\Files\Utils\Scanner', 'scanFile', function($path) use ($output) { |
|
89 | 89 | $output->writeln("\tFile <info>$path</info>", OutputInterface::VERBOSITY_VERBOSE); |
90 | 90 | ++$this->filesCounter; |
91 | 91 | $this->abortIfInterrupted(); |
92 | 92 | }); |
93 | 93 | |
94 | - $scanner->listen('\OC\Files\Utils\Scanner', 'scanFolder', function ($path) use ($output) { |
|
94 | + $scanner->listen('\OC\Files\Utils\Scanner', 'scanFolder', function($path) use ($output) { |
|
95 | 95 | $output->writeln("\tFolder <info>$path</info>", OutputInterface::VERBOSITY_VERBOSE); |
96 | 96 | ++$this->foldersCounter; |
97 | 97 | $this->abortIfInterrupted(); |
98 | 98 | }); |
99 | 99 | |
100 | - $scanner->listen('\OC\Files\Utils\Scanner', 'StorageNotAvailable', function (StorageNotAvailableException $e) use ($output) { |
|
101 | - $output->writeln('Error while scanning, storage not available (' . $e->getMessage() . ')', OutputInterface::VERBOSITY_VERBOSE); |
|
100 | + $scanner->listen('\OC\Files\Utils\Scanner', 'StorageNotAvailable', function(StorageNotAvailableException $e) use ($output) { |
|
101 | + $output->writeln('Error while scanning, storage not available ('.$e->getMessage().')', OutputInterface::VERBOSITY_VERBOSE); |
|
102 | 102 | }); |
103 | 103 | |
104 | - $scanner->listen('\OC\Files\Utils\Scanner', 'scanFile', function ($path) use ($output) { |
|
104 | + $scanner->listen('\OC\Files\Utils\Scanner', 'scanFile', function($path) use ($output) { |
|
105 | 105 | $this->checkScanWarning($path, $output); |
106 | 106 | }); |
107 | 107 | |
108 | - $scanner->listen('\OC\Files\Utils\Scanner', 'scanFolder', function ($path) use ($output) { |
|
108 | + $scanner->listen('\OC\Files\Utils\Scanner', 'scanFolder', function($path) use ($output) { |
|
109 | 109 | $this->checkScanWarning($path, $output); |
110 | 110 | }); |
111 | 111 | |
@@ -118,10 +118,10 @@ discard block |
||
118 | 118 | # exit the function if ctrl-c has been pressed |
119 | 119 | $output->writeln('Interrupted by user'); |
120 | 120 | } catch (NotFoundException $e) { |
121 | - $output->writeln('<error>Path not found: ' . $e->getMessage() . '</error>'); |
|
121 | + $output->writeln('<error>Path not found: '.$e->getMessage().'</error>'); |
|
122 | 122 | } catch (\Exception $e) { |
123 | - $output->writeln('<error>Exception during scan: ' . $e->getMessage() . '</error>'); |
|
124 | - $output->writeln('<error>' . $e->getTraceAsString() . '</error>'); |
|
123 | + $output->writeln('<error>Exception during scan: '.$e->getMessage().'</error>'); |
|
124 | + $output->writeln('<error>'.$e->getTraceAsString().'</error>'); |
|
125 | 125 | } |
126 | 126 | } |
127 | 127 | |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | * @return string |
217 | 217 | */ |
218 | 218 | protected function formatExecTime() { |
219 | - list($secs, ) = explode('.', sprintf("%.1f", $this->execTime)); |
|
219 | + list($secs,) = explode('.', sprintf("%.1f", $this->execTime)); |
|
220 | 220 | |
221 | 221 | # if you want to have microseconds add this: . '.' . $tens; |
222 | 222 | return date('H:i:s', $secs); |