@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | $output = $output ?? new NullOutput(); |
91 | 91 | $sourceUid = $sourceUser->getUID(); |
92 | 92 | $destinationUid = $destinationUser->getUID(); |
93 | - $sourcePath = rtrim($sourceUid . '/files/' . $path, '/'); |
|
93 | + $sourcePath = rtrim($sourceUid.'/files/'.$path, '/'); |
|
94 | 94 | |
95 | 95 | // target user has to be ready |
96 | 96 | if ($destinationUser->getLastLogin() === 0 || !$this->encryptionManager->isReadyForUser($destinationUid)) { |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | OutputInterface $output): void { |
194 | 194 | $output->writeln('Validating quota'); |
195 | 195 | $size = $view->getFileInfo($sourcePath, false)->getSize(false); |
196 | - $freeSpace = $view->free_space($destinationUid . '/files/'); |
|
196 | + $freeSpace = $view->free_space($destinationUid.'/files/'); |
|
197 | 197 | if ($size > $freeSpace && $freeSpace !== FileInfo::SPACE_UNKNOWN) { |
198 | 198 | $output->writeln('<error>Target user does not have enough free space available.</error>'); |
199 | 199 | throw new \Exception('Execution terminated.'); |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | |
206 | 206 | $encryptedFiles = []; |
207 | 207 | $this->walkFiles($view, $sourcePath, |
208 | - function (FileInfo $fileInfo) use ($progress) { |
|
208 | + function(FileInfo $fileInfo) use ($progress) { |
|
209 | 209 | if ($fileInfo->getType() === FileInfo::TYPE_FOLDER) { |
210 | 210 | // only analyze into folders from main storage, |
211 | 211 | if (!$fileInfo->getStorage()->instanceOfStorage(IHomeStorage::class)) { |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | $output->writeln("<error>Some files are encrypted - please decrypt them first.</error>"); |
228 | 228 | foreach ($encryptedFiles as $encryptedFile) { |
229 | 229 | /** @var FileInfo $encryptedFile */ |
230 | - $output->writeln(" " . $encryptedFile->getPath()); |
|
230 | + $output->writeln(" ".$encryptedFile->getPath()); |
|
231 | 231 | } |
232 | 232 | throw new \Exception('Execution terminated.'); |
233 | 233 | } |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | // Else only the content inside folder is transferred which is not correct. |
272 | 272 | if ($sourcePath !== "$sourceUid/files") { |
273 | 273 | $view->mkdir($finalTarget); |
274 | - $finalTarget = $finalTarget . '/' . basename($sourcePath); |
|
274 | + $finalTarget = $finalTarget.'/'.basename($sourcePath); |
|
275 | 275 | } |
276 | 276 | if ($view->rename($sourcePath, $finalTarget) === false) { |
277 | 277 | throw new TransferOwnershipException("Could not transfer files.", 1); |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | if ($share->getShareType() === IShare::TYPE_USER && |
295 | 295 | $share->getSharedWith() === $destinationUid) { |
296 | 296 | // Unmount the shares before deleting, so we don't try to get the storage later on. |
297 | - $shareMountPoint = $this->mountManager->find('/' . $destinationUid . '/files' . $share->getTarget()); |
|
297 | + $shareMountPoint = $this->mountManager->find('/'.$destinationUid.'/files'.$share->getTarget()); |
|
298 | 298 | if ($shareMountPoint) { |
299 | 299 | $this->mountManager->removeMount($shareMountPoint->getMountPoint()); |
300 | 300 | } |
@@ -310,9 +310,9 @@ discard block |
||
310 | 310 | $this->shareManager->updateShare($share); |
311 | 311 | } |
312 | 312 | } catch (\OCP\Files\NotFoundException $e) { |
313 | - $output->writeln('<error>Share with id ' . $share->getId() . ' points at deleted file, skipping</error>'); |
|
313 | + $output->writeln('<error>Share with id '.$share->getId().' points at deleted file, skipping</error>'); |
|
314 | 314 | } catch (\Throwable $e) { |
315 | - $output->writeln('<error>Could not restore share with id ' . $share->getId() . ':' . $e->getTraceAsString() . '</error>'); |
|
315 | + $output->writeln('<error>Could not restore share with id '.$share->getId().':'.$e->getTraceAsString().'</error>'); |
|
316 | 316 | } |
317 | 317 | $progress->advance(); |
318 | 318 | } |