@@ -41,6 +41,6 @@ |
||
41 | 41 | * @return string |
42 | 42 | */ |
43 | 43 | public function getResourcePath() { |
44 | - return $this->webPath . '/' . $this->resource; |
|
44 | + return $this->webPath.'/'.$this->resource; |
|
45 | 45 | } |
46 | 46 | } |
@@ -41,13 +41,13 @@ |
||
41 | 41 | */ |
42 | 42 | public function cas($key, $old, $new) { |
43 | 43 | //no native cas, emulate with locking |
44 | - if ($this->add($key . '_lock', true)) { |
|
44 | + if ($this->add($key.'_lock', true)) { |
|
45 | 45 | if ($this->get($key) === $old) { |
46 | 46 | $this->set($key, $new); |
47 | - $this->remove($key . '_lock'); |
|
47 | + $this->remove($key.'_lock'); |
|
48 | 48 | return true; |
49 | 49 | } else { |
50 | - $this->remove($key . '_lock'); |
|
50 | + $this->remove($key.'_lock'); |
|
51 | 51 | return false; |
52 | 52 | } |
53 | 53 | } else { |
@@ -38,13 +38,13 @@ |
||
38 | 38 | */ |
39 | 39 | public function cad($key, $old) { |
40 | 40 | //no native cas, emulate with locking |
41 | - if ($this->add($key . '_lock', true)) { |
|
41 | + if ($this->add($key.'_lock', true)) { |
|
42 | 42 | if ($this->get($key) === $old) { |
43 | 43 | $this->remove($key); |
44 | - $this->remove($key . '_lock'); |
|
44 | + $this->remove($key.'_lock'); |
|
45 | 45 | return true; |
46 | 46 | } else { |
47 | - $this->remove($key . '_lock'); |
|
47 | + $this->remove($key.'_lock'); |
|
48 | 48 | return false; |
49 | 49 | } |
50 | 50 | } else { |
@@ -372,12 +372,12 @@ |
||
372 | 372 | \OC\Files\Filesystem::initMountPoints($userId); |
373 | 373 | |
374 | 374 | try { |
375 | - $folder = $this->get('/' . $userId . '/files'); |
|
375 | + $folder = $this->get('/'.$userId.'/files'); |
|
376 | 376 | } catch (NotFoundException $e) { |
377 | - if (!$this->nodeExists('/' . $userId)) { |
|
378 | - $this->newFolder('/' . $userId); |
|
377 | + if (!$this->nodeExists('/'.$userId)) { |
|
378 | + $this->newFolder('/'.$userId); |
|
379 | 379 | } |
380 | - $folder = $this->newFolder('/' . $userId . '/files'); |
|
380 | + $folder = $this->newFolder('/'.$userId.'/files'); |
|
381 | 381 | } |
382 | 382 | |
383 | 383 | $this->userFolderCache->set($userId, $folder); |
@@ -64,7 +64,7 @@ |
||
64 | 64 | return null; |
65 | 65 | } |
66 | 66 | |
67 | - return new MountPoint('\OC\Files\ObjectStore\HomeObjectStoreStorage', '/' . $user->getUID(), $config['arguments'], $loader); |
|
67 | + return new MountPoint('\OC\Files\ObjectStore\HomeObjectStoreStorage', '/'.$user->getUID(), $config['arguments'], $loader); |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | /** |
@@ -39,6 +39,6 @@ |
||
39 | 39 | */ |
40 | 40 | public function getHomeMountForUser(IUser $user, IStorageFactory $loader) { |
41 | 41 | $arguments = ['user' => $user]; |
42 | - return new MountPoint('\OC\Files\Storage\Home', '/' . $user->getUID(), $arguments, $loader); |
|
42 | + return new MountPoint('\OC\Files\Storage\Home', '/'.$user->getUID(), $arguments, $loader); |
|
43 | 43 | } |
44 | 44 | } |
@@ -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) { |