From 9f002b6bf70574632f3cfc21039fe21d5d24efd4 Mon Sep 17 00:00:00 2001 From: Shish Date: Mon, 1 Jan 2024 03:27:39 +0000 Subject: [PATCH] typed arrays --- core/event.php | 2 +- ext/auto_tagger/main.php | 2 +- ext/comment/theme.php | 6 +++--- ext/ext_manager/main.php | 2 +- ext/ext_manager/theme.php | 2 +- ext/index/events.php | 2 +- ext/index/theme.php | 12 ++++++------ ext/not_a_tag/main.php | 4 ++-- ext/ouroboros_api/main.php | 2 +- ext/random_list/theme.php | 4 ++-- ext/rating/main.php | 2 +- ext/report_image/theme.php | 2 +- ext/tag_edit/main.php | 2 +- ext/tag_history/main.php | 2 +- ext/tag_list/main.php | 2 +- ext/upload/main.php | 4 ++-- themes/danbooru/index.theme.php | 4 ++-- themes/danbooru2/index.theme.php | 6 +++--- 18 files changed, 31 insertions(+), 31 deletions(-) diff --git a/core/event.php b/core/event.php index 20464d7c..5e8e9936 100644 --- a/core/event.php +++ b/core/event.php @@ -213,7 +213,7 @@ class CommandEvent extends Event public array $args = []; /** - * #param string[] $args + * @param string[] $args */ public function __construct(array $args) { diff --git a/ext/auto_tagger/main.php b/ext/auto_tagger/main.php index c9a4b707..fc2d860a 100644 --- a/ext/auto_tagger/main.php +++ b/ext/auto_tagger/main.php @@ -272,7 +272,7 @@ class AutoTagger extends Extension } /** - * #param string[] $tags_mixed + * @param string[] $tags_mixed */ private function apply_auto_tags(array $tags_mixed): ?array { diff --git a/ext/comment/theme.php b/ext/comment/theme.php index 8bef60e0..911b4eb0 100644 --- a/ext/comment/theme.php +++ b/ext/comment/theme.php @@ -111,7 +111,7 @@ class CommentListTheme extends Themelet /** * Add some comments to the page, probably in a sidebar. * - * #param Comment[] $comments An array of Comment objects to be shown + * @param Comment[] $comments An array of Comment objects to be shown */ public function display_recent_comments(array $comments) { @@ -128,7 +128,7 @@ class CommentListTheme extends Themelet /** * Show comments for an image. * - * #param Comment[] $comments + * @param Comment[] $comments */ public function display_image_comments(Image $image, array $comments, bool $postbox) { @@ -147,7 +147,7 @@ class CommentListTheme extends Themelet /** * Show comments made by a user. * - * #param Comment[] $comments + * @param Comment[] $comments */ public function display_recent_user_comments(array $comments, User $user) { diff --git a/ext/ext_manager/main.php b/ext/ext_manager/main.php index 164b0e82..c66a3edd 100644 --- a/ext/ext_manager/main.php +++ b/ext/ext_manager/main.php @@ -137,7 +137,7 @@ class ExtManager extends Extension } /** - * #param string[] $extras + * @param string[] $extras */ private function write_config(array $extras) { diff --git a/ext/ext_manager/theme.php b/ext/ext_manager/theme.php index 2b5bb35c..8e0ee1fa 100644 --- a/ext/ext_manager/theme.php +++ b/ext/ext_manager/theme.php @@ -25,7 +25,7 @@ use function MicroHTML\rawHTML; class ExtManagerTheme extends Themelet { /** - * #param ExtensionInfo[] $extensions + * @param ExtensionInfo[] $extensions */ public function display_table(Page $page, array $extensions, bool $editable) { diff --git a/ext/index/events.php b/ext/index/events.php index f89f1eb7..0c957872 100644 --- a/ext/index/events.php +++ b/ext/index/events.php @@ -67,7 +67,7 @@ class PostListBuildingEvent extends Event public array $parts = []; /** - * #param string[] $search + * @param string[] $search */ public function __construct(array $search) { diff --git a/ext/index/theme.php b/ext/index/theme.php index 72294709..9932eb1f 100644 --- a/ext/index/theme.php +++ b/ext/index/theme.php @@ -42,7 +42,7 @@ and of course start organising your images :-) } /** - * #param Image[] $images + * @param Image[] $images */ public function display_page(Page $page, array $images) { @@ -61,7 +61,7 @@ and of course start organising your images :-) } /** - * #param string[] $parts + * @param string[] $parts */ public function display_admin_block(array $parts) { @@ -71,7 +71,7 @@ and of course start organising your images :-) /** - * #param string[] $search_terms + * @param string[] $search_terms */ protected function build_navigation(int $page_number, int $total_pages, array $search_terms): string { @@ -96,7 +96,7 @@ and of course start organising your images :-) } /** - * #param Image[] $images + * @param Image[] $images */ protected function build_table(array $images, ?string $query): string { @@ -139,7 +139,7 @@ and of course start organising your images :-) } /** - * #param Image[] $images + * @param Image[] $images */ protected function display_page_header(Page $page, array $images) { @@ -165,7 +165,7 @@ and of course start organising your images :-) } /** - * #param Image[] $images + * @param Image[] $images */ protected function display_page_images(Page $page, array $images) { diff --git a/ext/not_a_tag/main.php b/ext/not_a_tag/main.php index 7b1028d8..84ed8ee4 100644 --- a/ext/not_a_tag/main.php +++ b/ext/not_a_tag/main.php @@ -68,7 +68,7 @@ class NotATag extends Extension } /** - * #param string[] $tags_mixed + * @param string[] $tags_mixed */ private function scan(array $tags_mixed) { @@ -90,7 +90,7 @@ class NotATag extends Extension } /** - * #param string[] $tags + * @param string[] $tags */ private function strip(array $tags): array { diff --git a/ext/ouroboros_api/main.php b/ext/ouroboros_api/main.php index 70e9758e..93c34814 100644 --- a/ext/ouroboros_api/main.php +++ b/ext/ouroboros_api/main.php @@ -415,7 +415,7 @@ class OuroborosAPI extends Extension /** * Wrapper for getting a list of posts - * #param string[] $tags + * @param string[] $tags */ protected function postIndex(int $limit, int $page, array $tags) { diff --git a/ext/random_list/theme.php b/ext/random_list/theme.php index a0d2da46..8ccd5134 100644 --- a/ext/random_list/theme.php +++ b/ext/random_list/theme.php @@ -9,7 +9,7 @@ class RandomListTheme extends Themelet protected array $search_terms; /** - * #param string[] $search_terms + * @param string[] $search_terms */ public function set_page(array $search_terms) { @@ -17,7 +17,7 @@ class RandomListTheme extends Themelet } /** - * #param Image[] $images + * @param Image[] $images */ public function display_page(Page $page, array $images) { diff --git a/ext/rating/main.php b/ext/rating/main.php index 34a1e4a6..05363c0d 100644 --- a/ext/rating/main.php +++ b/ext/rating/main.php @@ -485,7 +485,7 @@ class Ratings extends Extension } /** - * #param string[] $context + * @param string[] $context */ private function no_rating_query(array $context): bool { diff --git a/ext/report_image/theme.php b/ext/report_image/theme.php index 55a16b99..91af0b05 100644 --- a/ext/report_image/theme.php +++ b/ext/report_image/theme.php @@ -56,7 +56,7 @@ class ReportImageTheme extends Themelet } /** - * #param ImageReport[] $reports + * @param ImageReport[] $reports */ public function display_image_banner(Image $image, array $reports) { diff --git a/ext/tag_edit/main.php b/ext/tag_edit/main.php index 3e49ee27..309c4ae7 100644 --- a/ext/tag_edit/main.php +++ b/ext/tag_edit/main.php @@ -56,7 +56,7 @@ class TagSetEvent extends Event public array $metatags; /** - * #param string[] $tags + * @param string[] $tags */ public function __construct(Image $image, array $tags) { diff --git a/ext/tag_history/main.php b/ext/tag_history/main.php index a748a552..94da23e5 100644 --- a/ext/tag_history/main.php +++ b/ext/tag_history/main.php @@ -346,7 +346,7 @@ class TagHistory extends Extension /** * This function is called just before an images tag are changed. * - * #param string[] $tags + * @param string[] $tags */ private function add_tag_history(Image $image, array $tags) { diff --git a/ext/tag_list/main.php b/ext/tag_list/main.php index 89d45138..97bd1546 100644 --- a/ext/tag_list/main.php +++ b/ext/tag_list/main.php @@ -530,7 +530,7 @@ class TagList extends Extension } /** - * #param string[] $search + * @param string[] $search */ private function add_refine_block(Page $page, array $search) { diff --git a/ext/upload/main.php b/ext/upload/main.php index 46bec523..96a23467 100644 --- a/ext/upload/main.php +++ b/ext/upload/main.php @@ -314,8 +314,8 @@ class Upload extends Extension /** * Handle an upload. - * #param string[] $file - * #param string[] $tags + * @param mixed[] $file + * @param string[] $tags */ private function try_upload(array $file, array $tags, ?string $source = null, ?int $replace_id = null): array { diff --git a/themes/danbooru/index.theme.php b/themes/danbooru/index.theme.php index 20e32b38..8dd0aa9c 100644 --- a/themes/danbooru/index.theme.php +++ b/themes/danbooru/index.theme.php @@ -7,7 +7,7 @@ namespace Shimmie2; class CustomIndexTheme extends IndexTheme { /** - * #param Image[] $images + * @param Image[] $images */ public function display_page(Page $page, array $images) { @@ -42,7 +42,7 @@ class CustomIndexTheme extends IndexTheme } /** - * #param string[] $search_terms + * @param string[] $search_terms */ protected function build_navigation(int $page_number, int $total_pages, array $search_terms): string { diff --git a/themes/danbooru2/index.theme.php b/themes/danbooru2/index.theme.php index 51bf4473..e1fa8aa4 100644 --- a/themes/danbooru2/index.theme.php +++ b/themes/danbooru2/index.theme.php @@ -7,7 +7,7 @@ namespace Shimmie2; class CustomIndexTheme extends IndexTheme { /** - * #param Image[] $images + * @param Image[] $images */ public function display_page(Page $page, array $images) { @@ -26,7 +26,7 @@ class CustomIndexTheme extends IndexTheme } /** - * #param string[] $search_terms + * @param string[] $search_terms */ protected function build_navigation(int $page_number, int $total_pages, array $search_terms): string { @@ -42,7 +42,7 @@ class CustomIndexTheme extends IndexTheme } /** - * #param Image[] $images + * @param Image[] $images */ protected function build_table(array $images, ?string $query): string {