From ad9bdde32dafdb10eb26baa52643da6aaa9569e5 Mon Sep 17 00:00:00 2001 From: Mike Colagrosso Date: Sat, 6 Jul 2024 12:34:45 -0600 Subject: [PATCH] Use array shapes in PHPDoc for FilterArtwork --- lib/Library.php | 6 +----- www/artworks/index.php | 2 -- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/Library.php b/lib/Library.php index a9614b51..0c826ad5 100644 --- a/lib/Library.php +++ b/lib/Library.php @@ -168,13 +168,9 @@ class Library{ } /** - * @return array|int> + * @return array{artworks: array, artworksCount: int} */ public static function FilterArtwork(?string $query = null, ?string $status = null, ?ArtworkSortType $sort = null, ?int $submitterUserId = null, int $page = 1, int $perPage = ARTWORK_PER_PAGE): array{ - // Returns an array of: - // ['artworks'] => array, - // ['artworksCount'] => int - // // $status is either the string value of an ArtworkStatus enum, or one of these special statuses: // null: same as "all" // "all": Show all approved and in use artwork diff --git a/www/artworks/index.php b/www/artworks/index.php index b1e40e85..cb7efdc7 100644 --- a/www/artworks/index.php +++ b/www/artworks/index.php @@ -68,9 +68,7 @@ try{ } else{ $result = Library::FilterArtwork($query, $filterArtworkStatus, $sort, $submitterUserId, $page, $perPage); - /** @var array $artworks */ $artworks = $result['artworks']; - /** @var int $totalArtworkCount */ $totalArtworkCount = $result['artworksCount']; }