Skip to content
Prev Previous commit
fix type hints
Signed-off-by: Robin Appelman <[email protected]>
  • Loading branch information
icewind1991 committed Mar 24, 2021
commit 4b65a1dcd7192c0a32b2fb8b3184c06f788574c7
4 changes: 4 additions & 0 deletions lib/private/Files/Cache/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,10 @@ public function searchByMime($mimetype) {
}, $files);
}

/**
* @param ISearchQuery $searchQuery
* @return CacheEntry[]
*/
public function searchQuery(ISearchQuery $searchQuery) {
$builder = $this->getQueryBuilder();

Expand Down
6 changes: 3 additions & 3 deletions lib/private/Files/Node/Folder.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@
namespace OC\Files\Node;

use OC\DB\QueryBuilder\Literal;
use OC\Files\Cache\CacheEntry;
use OC\Files\Search\SearchBinaryOperator;
use OC\Files\Search\SearchComparison;
use OC\Files\Search\SearchQuery;
use OC\Files\Storage\Wrapper\Jail;
use OC\Files\Storage\Storage;
use OCA\Files_Sharing\SharedStorage;
use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\Files\Cache\ICacheEntry;
use OCP\Files\Config\ICachedMountInfo;
use OCP\Files\FileInfo;
use OCP\Files\Mount\IMountPoint;
Expand Down Expand Up @@ -323,7 +323,7 @@ public function search($query) {
}, $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);
$cacheEntry['internalPath'] = $cacheEntry['path'];
$cacheEntry['path'] = $appendRoot . substr($cacheEntry['path'], $trimLength);
Expand Down Expand Up @@ -364,7 +364,7 @@ public function searchByTag($tag, $userId) {
public function getById($id) {
$mountCache = $this->root->getUserMountCache();
if (strpos($this->getPath(), '/', 1) > 0) {
list(, $user) = explode('/', $this->getPath());
[, $user] = explode('/', $this->getPath());
} else {
$user = null;
}
Expand Down