@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | $this->realDataDir = $this->datadir; |
68 | 68 | } else { |
69 | 69 | $realPath = realpath($this->datadir) ?: $this->datadir; |
70 | - $this->realDataDir = rtrim($realPath, '/') . '/'; |
|
70 | + $this->realDataDir = rtrim($realPath, '/').'/'; |
|
71 | 71 | } |
72 | 72 | if (substr($this->datadir, -1) !== '/') { |
73 | 73 | $this->datadir .= '/'; |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | } |
80 | 80 | |
81 | 81 | public function getId() { |
82 | - return 'local::' . $this->datadir; |
|
82 | + return 'local::'.$this->datadir; |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | public function mkdir($path) { |
@@ -249,17 +249,17 @@ discard block |
||
249 | 249 | $dstParent = dirname($path2); |
250 | 250 | |
251 | 251 | if (!$this->isUpdatable($srcParent)) { |
252 | - \OCP\Util::writeLog('core', 'unable to rename, source directory is not writable : ' . $srcParent, ILogger::ERROR); |
|
252 | + \OCP\Util::writeLog('core', 'unable to rename, source directory is not writable : '.$srcParent, ILogger::ERROR); |
|
253 | 253 | return false; |
254 | 254 | } |
255 | 255 | |
256 | 256 | if (!$this->isUpdatable($dstParent)) { |
257 | - \OCP\Util::writeLog('core', 'unable to rename, destination directory is not writable : ' . $dstParent, ILogger::ERROR); |
|
257 | + \OCP\Util::writeLog('core', 'unable to rename, destination directory is not writable : '.$dstParent, ILogger::ERROR); |
|
258 | 258 | return false; |
259 | 259 | } |
260 | 260 | |
261 | 261 | if (!$this->file_exists($path1)) { |
262 | - \OCP\Util::writeLog('core', 'unable to rename, file does not exists : ' . $path1, ILogger::ERROR); |
|
262 | + \OCP\Util::writeLog('core', 'unable to rename, file does not exists : '.$path1, ILogger::ERROR); |
|
263 | 263 | return false; |
264 | 264 | } |
265 | 265 | |
@@ -344,13 +344,13 @@ discard block |
||
344 | 344 | foreach (scandir($physicalDir) as $item) { |
345 | 345 | if (\OC\Files\Filesystem::isIgnoredDir($item)) |
346 | 346 | continue; |
347 | - $physicalItem = $physicalDir . '/' . $item; |
|
347 | + $physicalItem = $physicalDir.'/'.$item; |
|
348 | 348 | |
349 | 349 | if (strstr(strtolower($item), strtolower($query)) !== false) { |
350 | - $files[] = $dir . '/' . $item; |
|
350 | + $files[] = $dir.'/'.$item; |
|
351 | 351 | } |
352 | 352 | if (is_dir($physicalItem)) { |
353 | - $files = array_merge($files, $this->searchInDir($query, $dir . '/' . $item)); |
|
353 | + $files = array_merge($files, $this->searchInDir($query, $dir.'/'.$item)); |
|
354 | 354 | } |
355 | 355 | } |
356 | 356 | return $files; |
@@ -383,7 +383,7 @@ discard block |
||
383 | 383 | throw new ForbiddenException('Invalid path', false); |
384 | 384 | } |
385 | 385 | |
386 | - $fullPath = $this->datadir . $path; |
|
386 | + $fullPath = $this->datadir.$path; |
|
387 | 387 | $currentPath = $path; |
388 | 388 | if ($this->allowSymlinks || $currentPath === '') { |
389 | 389 | return $fullPath; |
@@ -395,10 +395,10 @@ discard block |
||
395 | 395 | if ($currentPath === '' || $currentPath === '.') { |
396 | 396 | return $fullPath; |
397 | 397 | } |
398 | - $realPath = realpath($this->datadir . $currentPath); |
|
398 | + $realPath = realpath($this->datadir.$currentPath); |
|
399 | 399 | } |
400 | 400 | if ($realPath) { |
401 | - $realPath = $realPath . '/'; |
|
401 | + $realPath = $realPath.'/'; |
|
402 | 402 | } |
403 | 403 | if (substr($realPath, 0, $this->dataDirLength) === $this->realDataDir) { |
404 | 404 | return $fullPath; |
@@ -425,9 +425,9 @@ discard block |
||
425 | 425 | if ($this->is_file($path)) { |
426 | 426 | $stat = $this->stat($path); |
427 | 427 | return md5( |
428 | - $stat['mtime'] . |
|
429 | - $stat['ino'] . |
|
430 | - $stat['dev'] . |
|
428 | + $stat['mtime']. |
|
429 | + $stat['ino']. |
|
430 | + $stat['dev']. |
|
431 | 431 | $stat['size'] |
432 | 432 | ); |
433 | 433 | } else { |
@@ -485,6 +485,6 @@ discard block |
||
485 | 485 | } |
486 | 486 | |
487 | 487 | public function writeStream(string $path, $stream, int $size = null): int { |
488 | - return (int)file_put_contents($this->getSourcePath($path), $stream); |
|
488 | + return (int) file_put_contents($this->getSourcePath($path), $stream); |
|
489 | 489 | } |
490 | 490 | } |