diff --git a/lib/Library.php b/lib/Library.php index 44aebfa5..a11283e9 100644 --- a/lib/Library.php +++ b/lib/Library.php @@ -16,13 +16,9 @@ use function Safe\usort; class Library{ /** * @param array $tags - * @return array|int> + * @return array{ebooks: array, ebooksCount: int} */ public static function FilterEbooks(string $query = null, array $tags = [], EbookSortType $sort = null, int $page = 1, int $perPage = EBOOKS_PER_PAGE): array{ - // Returns an array of: - // ['ebooks'] => array, - // ['ebooksCount'] => int - $limit = $perPage; $offset = (($page - 1) * $perPage); $joinContributors = ''; diff --git a/www/ebooks/index.php b/www/ebooks/index.php index 87d4b982..5945fb7a 100644 --- a/www/ebooks/index.php +++ b/www/ebooks/index.php @@ -36,9 +36,7 @@ try{ } $result = Library::FilterEbooks($query != '' ? $query : null, $tags, $sort, $page, $perPage); - /** @var array $ebooks */ $ebooks = $result['ebooks']; - /** @var int $totalEbooks */ $totalEbooks = $result['ebooksCount']; $pageTitle = 'Browse Standard Ebooks'; $pageHeader = 'Browse Ebooks';