@@ -88,11 +88,11 @@ discard block |
||
| 88 | 88 | |
| 89 | 89 | public function registerMounts(IUser $user, array $mounts) { |
| 90 | 90 | // filter out non-proper storages coming from unit tests |
| 91 | - $mounts = array_filter($mounts, function (IMountPoint $mount) { |
|
| 91 | + $mounts = array_filter($mounts, function(IMountPoint $mount) { |
|
| 92 | 92 | return $mount instanceof SharedMount || $mount->getStorage() && $mount->getStorage()->getCache(); |
| 93 | 93 | }); |
| 94 | 94 | /** @var ICachedMountInfo[] $newMounts */ |
| 95 | - $newMounts = array_map(function (IMountPoint $mount) use ($user) { |
|
| 95 | + $newMounts = array_map(function(IMountPoint $mount) use ($user) { |
|
| 96 | 96 | // filter out any storages which aren't scanned yet since we aren't interested in files from those storages (yet) |
| 97 | 97 | if ($mount->getStorageRootId() === -1) { |
| 98 | 98 | return null; |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | $newMounts = array_values(array_filter($newMounts)); |
| 104 | 104 | |
| 105 | 105 | $cachedMounts = $this->getMountsForUser($user); |
| 106 | - $mountDiff = function (ICachedMountInfo $mount1, ICachedMountInfo $mount2) { |
|
| 106 | + $mountDiff = function(ICachedMountInfo $mount1, ICachedMountInfo $mount2) { |
|
| 107 | 107 | // since we are only looking for mounts for a specific user comparing on root id is enough |
| 108 | 108 | return $mount1->getRootId() - $mount2->getRootId(); |
| 109 | 109 | }; |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | ], ['root_id', 'user_id']); |
| 161 | 161 | } else { |
| 162 | 162 | // in some cases this is legitimate, like orphaned shares |
| 163 | - $this->logger->debug('Could not get storage info for mount at ' . $mount->getMountPoint()); |
|
| 163 | + $this->logger->debug('Could not get storage info for mount at '.$mount->getMountPoint()); |
|
| 164 | 164 | } |
| 165 | 165 | } |
| 166 | 166 | |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | if (is_null($user)) { |
| 191 | 191 | return null; |
| 192 | 192 | } |
| 193 | - return new CachedMountInfo($user, (int)$row['storage_id'], (int)$row['root_id'], $row['mount_point'], $row['mount_id']); |
|
| 193 | + return new CachedMountInfo($user, (int) $row['storage_id'], (int) $row['root_id'], $row['mount_point'], $row['mount_id']); |
|
| 194 | 194 | } |
| 195 | 195 | |
| 196 | 196 | /** |
@@ -256,11 +256,11 @@ discard block |
||
| 256 | 256 | $row = $query->execute()->fetch(); |
| 257 | 257 | if (is_array($row)) { |
| 258 | 258 | $this->cacheInfoCache[$fileId] = [ |
| 259 | - (int)$row['storage'], |
|
| 259 | + (int) $row['storage'], |
|
| 260 | 260 | $row['path'] |
| 261 | 261 | ]; |
| 262 | 262 | } else { |
| 263 | - throw new NotFoundException('File with id "' . $fileId . '" not found'); |
|
| 263 | + throw new NotFoundException('File with id "'.$fileId.'" not found'); |
|
| 264 | 264 | } |
| 265 | 265 | } |
| 266 | 266 | return $this->cacheInfoCache[$fileId]; |
@@ -280,7 +280,7 @@ discard block |
||
| 280 | 280 | $mountsForStorage = $this->getMountsForStorageId($storageId); |
| 281 | 281 | |
| 282 | 282 | // filter mounts that are from the same storage but a different directory |
| 283 | - return array_filter($mountsForStorage, function (ICachedMountInfo $mount) use ($internalPath, $fileId) { |
|
| 283 | + return array_filter($mountsForStorage, function(ICachedMountInfo $mount) use ($internalPath, $fileId) { |
|
| 284 | 284 | if ($fileId === $mount->getRootId()) { |
| 285 | 285 | return true; |
| 286 | 286 | } |
@@ -290,7 +290,7 @@ discard block |
||
| 290 | 290 | return false; |
| 291 | 291 | } |
| 292 | 292 | |
| 293 | - return $internalMountPath === '' || substr($internalPath, 0, strlen($internalMountPath) + 1) === $internalMountPath . '/'; |
|
| 293 | + return $internalMountPath === '' || substr($internalPath, 0, strlen($internalMountPath) + 1) === $internalMountPath.'/'; |
|
| 294 | 294 | }); |
| 295 | 295 | |
| 296 | 296 | } |