php-lint
parent
6f3cb99ddb
commit
5ce70faee1
|
@ -33,8 +33,8 @@ class DaysController extends ApiBase
|
|||
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
*
|
||||
* @NoCSRFRequired
|
||||
*
|
||||
* @PublicPage
|
||||
*/
|
||||
|
|
|
@ -2,21 +2,14 @@
|
|||
|
||||
namespace OCA\Memories\Controller;
|
||||
|
||||
use OCA\Memories\Db\TimelineQuery;
|
||||
use OCP\Files\FileInfo;
|
||||
use OCP\Files\Folder;
|
||||
use OCA\Memories\Db\TimelineQuery;
|
||||
|
||||
trait FoldersTrait {
|
||||
trait FoldersTrait
|
||||
{
|
||||
protected TimelineQuery $timelineQuery;
|
||||
|
||||
private function getFolderPreviews(Folder &$parent, FileInfo &$fileInfo) {
|
||||
$folder = $parent->getById($fileInfo->getId());
|
||||
if (count($folder) === 0) {
|
||||
return [];
|
||||
}
|
||||
return $this->timelineQuery->getFolderPreviews($folder[0]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get subfolders entry for days response.
|
||||
*/
|
||||
|
@ -52,4 +45,14 @@ trait FoldersTrait {
|
|||
}, $folders, []),
|
||||
];
|
||||
}
|
||||
|
||||
private function getFolderPreviews(Folder &$parent, FileInfo &$fileInfo)
|
||||
{
|
||||
$folder = $parent->getById($fileInfo->getId());
|
||||
if (0 === \count($folder)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return $this->timelineQuery->getFolderPreviews($folder[0]);
|
||||
}
|
||||
}
|
|
@ -13,8 +13,8 @@ class TimelineQuery
|
|||
use TimelineQueryDays;
|
||||
use TimelineQueryFaces;
|
||||
use TimelineQueryFilters;
|
||||
use TimelineQueryTags;
|
||||
use TimelineQueryFolders;
|
||||
use TimelineQueryTags;
|
||||
|
||||
protected IDBConnection $connection;
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@ declare(strict_types=1);
|
|||
|
||||
namespace OCA\Memories\Db;
|
||||
|
||||
use OCP\DB\QueryBuilder\IQueryBuilder;
|
||||
use OCP\Files\Folder;
|
||||
use OCP\IDBConnection;
|
||||
|
||||
|
|
Loading…
Reference in New Issue