fix type hints

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2021-03-24 16:32:38 +01:00
parent 4ede9dbb07
commit 4b65a1dcd7
No known key found for this signature in database
GPG Key ID: 42B69D8A64526EFB
2 changed files with 7 additions and 3 deletions

View File

@ -811,6 +811,10 @@ class Cache implements ICache {
}, $files); }, $files);
} }
/**
* @param ISearchQuery $searchQuery
* @return CacheEntry[]
*/
public function searchQuery(ISearchQuery $searchQuery) { public function searchQuery(ISearchQuery $searchQuery) {
$builder = $this->getQueryBuilder(); $builder = $this->getQueryBuilder();

View File

@ -32,6 +32,7 @@
namespace OC\Files\Node; namespace OC\Files\Node;
use OC\DB\QueryBuilder\Literal; use OC\DB\QueryBuilder\Literal;
use OC\Files\Cache\CacheEntry;
use OC\Files\Search\SearchBinaryOperator; use OC\Files\Search\SearchBinaryOperator;
use OC\Files\Search\SearchComparison; use OC\Files\Search\SearchComparison;
use OC\Files\Search\SearchQuery; use OC\Files\Search\SearchQuery;
@ -39,7 +40,6 @@ use OC\Files\Storage\Wrapper\Jail;
use OC\Files\Storage\Storage; use OC\Files\Storage\Storage;
use OCA\Files_Sharing\SharedStorage; use OCA\Files_Sharing\SharedStorage;
use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\Files\Cache\ICacheEntry;
use OCP\Files\Config\ICachedMountInfo; use OCP\Files\Config\ICachedMountInfo;
use OCP\Files\FileInfo; use OCP\Files\FileInfo;
use OCP\Files\Mount\IMountPoint; use OCP\Files\Mount\IMountPoint;
@ -323,7 +323,7 @@ class Folder extends Node implements \OCP\Files\Folder {
}, $files); }, $files);
} }
private function cacheEntryToFileInfo(IMountPoint $mount, string $appendRoot, string $trimRoot, ICacheEntry $cacheEntry): FileInfo { private function cacheEntryToFileInfo(IMountPoint $mount, string $appendRoot, string $trimRoot, CacheEntry $cacheEntry): FileInfo {
$trimLength = strlen($trimRoot); $trimLength = strlen($trimRoot);
$cacheEntry['internalPath'] = $cacheEntry['path']; $cacheEntry['internalPath'] = $cacheEntry['path'];
$cacheEntry['path'] = $appendRoot . substr($cacheEntry['path'], $trimLength); $cacheEntry['path'] = $appendRoot . substr($cacheEntry['path'], $trimLength);
@ -364,7 +364,7 @@ class Folder extends Node implements \OCP\Files\Folder {
public function getById($id) { public function getById($id) {
$mountCache = $this->root->getUserMountCache(); $mountCache = $this->root->getUserMountCache();
if (strpos($this->getPath(), '/', 1) > 0) { if (strpos($this->getPath(), '/', 1) > 0) {
list(, $user) = explode('/', $this->getPath()); [, $user] = explode('/', $this->getPath());
} else { } else {
$user = null; $user = null;
} }