Skip to content

Commit

Permalink
fix(psalm issue)
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Klehr <[email protected]>
  • Loading branch information
marcelklehr committed Dec 3, 2023
1 parent 93ca779 commit f19bf55
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions lib/Dav/Faces/PropFindPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,10 @@ public function propFind(PropFind $propFind, INode $node) {
)
);
});
$propFind->handle(self::FILE_NAME_PROPERTYNAME, function () use ($node) {
return $node->getFile()->getName();
});
$propFind->handle(self::FILE_NAME_PROPERTYNAME, fn () => $node->getFile()->getName());
$propFind->handle(self::REALPATH_PROPERTYNAME, fn () => $node->getFile()->getPath());
$propFind->handle(FilesPlugin::INTERNAL_FILEID_PROPERTYNAME, fn () => $node->getFile()->getId());
$propFind->handle(FilesPlugin::GETETAG_PROPERTYNAME, fn () => $node->getETag());
$propFind->handle(self::FILE_NAME_PROPERTYNAME, fn () => $node->getFile()->getName());
$propFind->handle(TagsPlugin::FAVORITE_PROPERTYNAME, fn () => $node->isFavorite() ? 1 : 0);
$propFind->handle(FilesPlugin::HAS_PREVIEW_PROPERTYNAME, fn () => json_encode($this->previewManager->isAvailable($node->getFile()->getFileInfo())));
$propFind->handle(FilesPlugin::PERMISSIONS_PROPERTYNAME, function () use ($node): string {
Expand Down
2 changes: 1 addition & 1 deletion lib/Service/StorageService.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ public function getMounts(): \Generator {
// Only crawl files, not cache or trashbin
$qb = new CacheQueryBuilder($this->db, $this->systemConfig, $this->logger, $this->metadataManager);
try {
/** @var array|false $root */
$result = $qb->selectFileCache()
->andWhere($qb->expr()->eq('filecache.storage', $qb->createNamedParameter($storageId, IQueryBuilder::PARAM_INT)))
->andWhere($qb->expr()->eq('filecache.path', $qb->createNamedParameter('files')))
->executeQuery();
/** @var array|false $root */
$root = $result->fetch();
$result->closeCursor();
if ($root !== false) {
Expand Down

0 comments on commit f19bf55

Please sign in to comment.