@@ -50,6 +50,6 @@ |
||
| 50 | 50 | public function getBucket($numBuckets = 64) { |
| 51 | 51 | $hash = md5($this->user->getUID()); |
| 52 | 52 | $num = hexdec(substr($hash, 0, 4)); |
| 53 | - return (string)($num % $numBuckets); |
|
| 53 | + return (string) ($num % $numBuckets); |
|
| 54 | 54 | } |
| 55 | 55 | } |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | // no point in continuing if the section was not found, use original path |
| 81 | 81 | return $fullPath; |
| 82 | 82 | } |
| 83 | - $path = $convertedPath . '/'; |
|
| 83 | + $path = $convertedPath.'/'; |
|
| 84 | 84 | } |
| 85 | 85 | $path = rtrim($path, '/'); |
| 86 | 86 | return $path; |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | * @return string|null original or converted path, or null if none of the forms was found |
| 97 | 97 | */ |
| 98 | 98 | private function findPathToUseLastSection($basePath, $lastSection) { |
| 99 | - $fullPath = $basePath . $lastSection; |
|
| 99 | + $fullPath = $basePath.$lastSection; |
|
| 100 | 100 | if ($lastSection === '' || $this->isAscii($lastSection) || $this->storage->file_exists($fullPath)) { |
| 101 | 101 | $this->namesCache[$fullPath] = $fullPath; |
| 102 | 102 | return $fullPath; |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | } else { |
| 109 | 109 | $otherFormPath = \Normalizer::normalize($lastSection, \Normalizer::FORM_C); |
| 110 | 110 | } |
| 111 | - $otherFullPath = $basePath . $otherFormPath; |
|
| 111 | + $otherFullPath = $basePath.$otherFormPath; |
|
| 112 | 112 | if ($this->storage->file_exists($otherFullPath)) { |
| 113 | 113 | $this->namesCache[$fullPath] = $otherFullPath; |
| 114 | 114 | return $otherFullPath; |
@@ -90,11 +90,11 @@ |
||
| 90 | 90 | */ |
| 91 | 91 | public function wrap(IMountPoint $mountPoint, $storage) { |
| 92 | 92 | $wrappers = array_values($this->storageWrappers); |
| 93 | - usort($wrappers, function ($a, $b) { |
|
| 93 | + usort($wrappers, function($a, $b) { |
|
| 94 | 94 | return $b['priority'] - $a['priority']; |
| 95 | 95 | }); |
| 96 | 96 | /** @var callable[] $wrappers */ |
| 97 | - $wrappers = array_map(function ($wrapper) { |
|
| 97 | + $wrappers = array_map(function($wrapper) { |
|
| 98 | 98 | return $wrapper['wrapper']; |
| 99 | 99 | }, $wrappers); |
| 100 | 100 | foreach ($wrappers as $wrapper) { |
@@ -89,11 +89,11 @@ |
||
| 89 | 89 | $result = true; |
| 90 | 90 | while ($file = readdir($dh)) { |
| 91 | 91 | if (!\OC\Files\Filesystem::isIgnoredDir($file)) { |
| 92 | - if ($this->is_dir($source . '/' . $file)) { |
|
| 93 | - $this->mkdir($target . '/' . $file); |
|
| 94 | - $result = $this->copyRecursive($source . '/' . $file, $target . '/' . $file); |
|
| 92 | + if ($this->is_dir($source.'/'.$file)) { |
|
| 93 | + $this->mkdir($target.'/'.$file); |
|
| 94 | + $result = $this->copyRecursive($source.'/'.$file, $target.'/'.$file); |
|
| 95 | 95 | } else { |
| 96 | - $result = parent::copy($source . '/' . $file, $target . '/' . $file); |
|
| 96 | + $result = parent::copy($source.'/'.$file, $target.'/'.$file); |
|
| 97 | 97 | } |
| 98 | 98 | if (!$result) { |
| 99 | 99 | break; |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | public function getId() { |
| 61 | - return (int)$this->data['fileid']; |
|
| 61 | + return (int) $this->data['fileid']; |
|
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | public function getStorageId() { |
@@ -67,7 +67,7 @@ |
||
| 67 | 67 | if ($sourceEntry->getMimeType() === ICacheEntry::DIRECTORY_MIMETYPE) { |
| 68 | 68 | $folderContent = $sourceCache->getFolderContentsById($sourceEntry->getId()); |
| 69 | 69 | foreach ($folderContent as $subEntry) { |
| 70 | - $subTargetPath = $targetPath . '/' . $subEntry->getName(); |
|
| 70 | + $subTargetPath = $targetPath.'/'.$subEntry->getName(); |
|
| 71 | 71 | $this->copyFromCache($sourceCache, $subEntry, $subTargetPath); |
| 72 | 72 | } |
| 73 | 73 | } |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | * @return int |
| 35 | 35 | */ |
| 36 | 36 | public function getStatus() { |
| 37 | - $status = parent::getStatus(); |
|
| 37 | + $status = parent::getStatus(); |
|
| 38 | 38 | if ($status === Http::STATUS_FORBIDDEN || $status === API::RESPOND_UNAUTHORISED) { |
| 39 | 39 | return Http::STATUS_UNAUTHORIZED; |
| 40 | 40 | } |
@@ -70,8 +70,8 @@ discard block |
||
| 70 | 70 | 'message' => $this->getOCSStatus() === 100 ? 'OK' : $this->statusMessage, |
| 71 | 71 | ]; |
| 72 | 72 | |
| 73 | - $meta['totalitems'] = $this->itemsCount !== null ? (string)$this->itemsCount : ''; |
|
| 74 | - $meta['itemsperpage'] = $this->itemsPerPage !== null ? (string)$this->itemsPerPage: ''; |
|
| 73 | + $meta['totalitems'] = $this->itemsCount !== null ? (string) $this->itemsCount : ''; |
|
| 74 | + $meta['itemsperpage'] = $this->itemsPerPage !== null ? (string) $this->itemsPerPage : ''; |
|
| 75 | 75 | |
| 76 | 76 | return $this->renderResult($meta); |
| 77 | 77 | } |
@@ -69,7 +69,7 @@ |
||
| 69 | 69 | $result->closeCursor(); |
| 70 | 70 | |
| 71 | 71 | if ($entriesUpdated > 0) { |
| 72 | - $output->info($entriesUpdated . ' mounts updated'); |
|
| 72 | + $output->info($entriesUpdated.' mounts updated'); |
|
| 73 | 73 | return; |
| 74 | 74 | } |
| 75 | 75 | |
@@ -93,7 +93,7 @@ |
||
| 93 | 93 | $result->closeCursor(); |
| 94 | 94 | |
| 95 | 95 | if ($deletedEntries) { |
| 96 | - $output->info('Removed ' . $deletedEntries . ' shares where user is not a member of the group anymore'); |
|
| 96 | + $output->info('Removed '.$deletedEntries.' shares where user is not a member of the group anymore'); |
|
| 97 | 97 | } |
| 98 | 98 | } |
| 99 | 99 | |