diff --git a/core/basethemelet.php b/core/basethemelet.php index 010b2e1b..b1ded94f 100644 --- a/core/basethemelet.php +++ b/core/basethemelet.php @@ -107,7 +107,7 @@ class BaseThemelet ); } - public function display_paginator(Page $page, string $base, ?string $query, int $page_number, int $total_pages, bool $show_random = false) + public function display_paginator(Page $page, string $base, ?string $query, int $page_number, int $total_pages, bool $show_random = false): void { if ($total_pages == 0) { $total_pages = 1; diff --git a/ext/admin/theme.php b/ext/admin/theme.php index 27bacdfa..521e0104 100644 --- a/ext/admin/theme.php +++ b/ext/admin/theme.php @@ -9,7 +9,7 @@ class AdminPageTheme extends Themelet /* * Show the basics of a page, for other extensions to add to */ - public function display_page() + public function display_page(): void { global $page; diff --git a/ext/approval/theme.php b/ext/approval/theme.php index 6701e41b..61488868 100644 --- a/ext/approval/theme.php +++ b/ext/approval/theme.php @@ -40,13 +40,13 @@ class ApprovalTheme extends Themelet ); } - public function display_admin_block(SetupBuildingEvent $event) + public function display_admin_block(SetupBuildingEvent $event): void { $sb = $event->panel->create_new_block("Approval"); $sb->add_bool_option(ApprovalConfig::IMAGES, "Posts: "); } - public function display_admin_form() + public function display_admin_form(): void { global $page; diff --git a/ext/biography/theme.php b/ext/biography/theme.php index 83857d13..37e91e86 100644 --- a/ext/biography/theme.php +++ b/ext/biography/theme.php @@ -8,12 +8,12 @@ use function MicroHTML\TEXTAREA; class BiographyTheme extends Themelet { - public function display_biography(Page $page, string $bio) + public function display_biography(Page $page, string $bio): void { $page->add_block(new Block("About Me", format_text($bio), "main", 30, "about-me")); } - public function display_composer(Page $page, string $bio) + public function display_composer(Page $page, string $bio): void { $html = SHM_SIMPLE_FORM( make_link("biography"), diff --git a/ext/blocks/theme.php b/ext/blocks/theme.php index 1757cb81..7dc73c46 100644 --- a/ext/blocks/theme.php +++ b/ext/blocks/theme.php @@ -16,7 +16,7 @@ use function MicroHTML\OPTION; class BlocksTheme extends Themelet { - public function display_blocks($blocks) + public function display_blocks($blocks): void { global $page; diff --git a/ext/blotter/theme.php b/ext/blotter/theme.php index e01098ee..7944d895 100644 --- a/ext/blotter/theme.php +++ b/ext/blotter/theme.php @@ -6,7 +6,7 @@ namespace Shimmie2; class BlotterTheme extends Themelet { - public function display_editor($entries) + public function display_editor($entries): void { global $page; $html = $this->get_html_for_blotter_editor($entries); @@ -16,7 +16,7 @@ class BlotterTheme extends Themelet $page->add_block(new Block("Navigation", "Index", "left", 0)); } - public function display_blotter_page($entries) + public function display_blotter_page($entries): void { global $page; $html = $this->get_html_for_blotter_page($entries); diff --git a/ext/bulk_actions/theme.php b/ext/bulk_actions/theme.php index 608b7778..e9af61fa 100644 --- a/ext/bulk_actions/theme.php +++ b/ext/bulk_actions/theme.php @@ -6,7 +6,7 @@ namespace Shimmie2; class BulkActionsTheme extends Themelet { - public function display_selector(Page $page, array $actions, string $query) + public function display_selector(Page $page, array $actions, string $query): void { $body = " diff --git a/ext/bulk_add/theme.php b/ext/bulk_add/theme.php index 63b30410..339bfd5b 100644 --- a/ext/bulk_add/theme.php +++ b/ext/bulk_add/theme.php @@ -13,7 +13,7 @@ class BulkAddTheme extends Themelet * * @param UploadResult[] $results */ - public function display_upload_results(Page $page, array $results) + public function display_upload_results(Page $page, array $results): void { $page->set_title("Adding folder"); $page->set_heading("Adding folder"); @@ -34,7 +34,7 @@ class BulkAddTheme extends Themelet * links to bulk_add with POST[dir] set to the name of a server-side * directory full of images */ - public function display_admin_block() + public function display_admin_block(): void { global $page; $html = " diff --git a/ext/bulk_add_csv/theme.php b/ext/bulk_add_csv/theme.php index 2128e5ae..26b1b50d 100644 --- a/ext/bulk_add_csv/theme.php +++ b/ext/bulk_add_csv/theme.php @@ -11,7 +11,7 @@ class BulkAddCSVTheme extends Themelet /* * Show a standard page for results to be put into */ - public function display_upload_results(Page $page) + public function display_upload_results(Page $page): void { $page->set_title("Adding posts from csv"); $page->set_heading("Adding posts from csv"); @@ -26,7 +26,7 @@ class BulkAddCSVTheme extends Themelet * links to bulk_add_csv with POST[csv] set to the name of a server-side * csv file */ - public function display_admin_block() + public function display_admin_block(): void { global $page; $html = " diff --git a/ext/comment/theme.php b/ext/comment/theme.php index 911b4eb0..ee628315 100644 --- a/ext/comment/theme.php +++ b/ext/comment/theme.php @@ -13,7 +13,7 @@ class CommentListTheme extends Themelet /** * Display a page with a list of images, and for each image, the image's comments. */ - public function display_comment_list(array $images, int $page_number, int $total_pages, bool $can_post) + public function display_comment_list(array $images, int $page_number, int $total_pages, bool $can_post): void { global $config, $page, $user; @@ -91,7 +91,7 @@ class CommentListTheme extends Themelet } } - public function display_admin_block() + public function display_admin_block(): void { global $page; @@ -113,7 +113,7 @@ class CommentListTheme extends Themelet * * @param Comment[] $comments An array of Comment objects to be shown */ - public function display_recent_comments(array $comments) + public function display_recent_comments(array $comments): void { global $page; $this->show_anon_id = false; @@ -130,7 +130,7 @@ class CommentListTheme extends Themelet * * @param Comment[] $comments */ - public function display_image_comments(Image $image, array $comments, bool $postbox) + public function display_image_comments(Image $image, array $comments, bool $postbox): void { global $page; $this->show_anon_id = true; @@ -149,7 +149,7 @@ class CommentListTheme extends Themelet * * @param Comment[] $comments */ - public function display_recent_user_comments(array $comments, User $user) + public function display_recent_user_comments(array $comments, User $user): void { global $page; $html = ""; @@ -164,7 +164,7 @@ class CommentListTheme extends Themelet $page->add_block(new Block("Comments", $html, "left", 70, "comment-list-user")); } - public function display_all_user_comments(array $comments, int $page_number, int $total_pages, User $user) + public function display_all_user_comments(array $comments, int $page_number, int $total_pages, User $user): void { global $page; diff --git a/ext/cron_uploader/theme.php b/ext/cron_uploader/theme.php index 6d89890c..6fe7e5d4 100644 --- a/ext/cron_uploader/theme.php +++ b/ext/cron_uploader/theme.php @@ -159,7 +159,7 @@ class CronUploaderTheme extends Themelet return (string)$html; } - public function display_form(array $failed_dirs) + public function display_form(array $failed_dirs): void { global $page; diff --git a/ext/downtime/theme.php b/ext/downtime/theme.php index 1a21d9ae..495c7cd6 100644 --- a/ext/downtime/theme.php +++ b/ext/downtime/theme.php @@ -9,7 +9,7 @@ class DowntimeTheme extends Themelet /** * Show the admin that downtime mode is enabled */ - public function display_notification(Page $page) + public function display_notification(Page $page): void { $page->add_block(new Block( "Downtime", @@ -22,7 +22,7 @@ class DowntimeTheme extends Themelet /** * Display $message and exit */ - public function display_message(string $message) + public function display_message(string $message): void { global $config, $user, $page; $theme_name = $config->get_string(SetupConfig::THEME); diff --git a/ext/emoticons_list/theme.php b/ext/emoticons_list/theme.php index 1f01a34b..d53d637f 100644 --- a/ext/emoticons_list/theme.php +++ b/ext/emoticons_list/theme.php @@ -6,7 +6,7 @@ namespace Shimmie2; class EmoticonListTheme extends Themelet { - public function display_emotes(array $list) + public function display_emotes(array $list): void { global $page; $data_href = get_base_href(); diff --git a/ext/et/theme.php b/ext/et/theme.php index 958075a1..9d908ac6 100644 --- a/ext/et/theme.php +++ b/ext/et/theme.php @@ -16,7 +16,7 @@ class ETTheme extends Themelet * * $info = an array of ($name => $value) */ - public function display_info_page($yaml) + public function display_info_page($yaml): void { global $page; diff --git a/ext/ext_manager/theme.php b/ext/ext_manager/theme.php index 3631f7bb..8d368390 100644 --- a/ext/ext_manager/theme.php +++ b/ext/ext_manager/theme.php @@ -27,7 +27,7 @@ class ExtManagerTheme extends Themelet /** * @param ExtensionInfo[] $extensions */ - public function display_table(Page $page, array $extensions, bool $editable) + public function display_table(Page $page, array $extensions, bool $editable): void { $tbody = TBODY(); @@ -104,7 +104,7 @@ class ExtManagerTheme extends Themelet $page->add_block(new Block("Extension Manager", $form)); } - public function display_doc(Page $page, ExtensionInfo $info) + public function display_doc(Page $page, ExtensionInfo $info): void { $author = emptyHTML(); if (count($info->authors) > 0) { diff --git a/ext/forum/theme.php b/ext/forum/theme.php index 2d49021d..a37e3719 100644 --- a/ext/forum/theme.php +++ b/ext/forum/theme.php @@ -10,7 +10,7 @@ use function MicroHTML\{INPUT, LABEL, SMALL, TEXTAREA, TR, TD, TABLE, TH, TBODY, class ForumTheme extends Themelet { - public function display_thread_list(Page $page, $threads, $showAdminOptions, $pageNumber, $totalPages) + public function display_thread_list(Page $page, $threads, $showAdminOptions, $pageNumber, $totalPages): void { if (count($threads) == 0) { $html = "There are no threads to show."; @@ -27,7 +27,7 @@ class ForumTheme extends Themelet - public function display_new_thread_composer(Page $page, $threadText = null, $threadTitle = null) + public function display_new_thread_composer(Page $page, $threadText = null, $threadTitle = null): void { global $config, $user; $max_characters = $config->get_int('forumMaxCharsPerPost'); @@ -75,7 +75,7 @@ class ForumTheme extends Themelet - public function display_new_post_composer(Page $page, $threadID) + public function display_new_post_composer(Page $page, $threadID): void { global $config; @@ -109,7 +109,7 @@ class ForumTheme extends Themelet - public function display_thread($posts, $showAdminOptions, $threadTitle, $threadID, $pageNumber, $totalPages) + public function display_thread($posts, $showAdminOptions, $threadTitle, $threadID, $pageNumber, $totalPages): void { global $config, $page/*, $user*/; diff --git a/ext/handle_cbz/theme.php b/ext/handle_cbz/theme.php index 5d6dff37..5ff89f3b 100644 --- a/ext/handle_cbz/theme.php +++ b/ext/handle_cbz/theme.php @@ -6,7 +6,7 @@ namespace Shimmie2; class CBZFileHandlerTheme extends Themelet { - public function display_image(Image $image) + public function display_image(Image $image): void { global $page; $data_href = get_base_href(); diff --git a/ext/handle_ico/theme.php b/ext/handle_ico/theme.php index 2f2587c0..39405e2c 100644 --- a/ext/handle_ico/theme.php +++ b/ext/handle_ico/theme.php @@ -6,7 +6,7 @@ namespace Shimmie2; class IcoFileHandlerTheme extends Themelet { - public function display_image(Image $image) + public function display_image(Image $image): void { global $page; $ilink = $image->get_image_link(); diff --git a/ext/handle_mp3/theme.php b/ext/handle_mp3/theme.php index a42a3a16..b7702919 100644 --- a/ext/handle_mp3/theme.php +++ b/ext/handle_mp3/theme.php @@ -6,7 +6,7 @@ namespace Shimmie2; class MP3FileHandlerTheme extends Themelet { - public function display_image(Image $image) + public function display_image(Image $image): void { global $page; $data_href = get_base_href(); diff --git a/ext/handle_pixel/theme.php b/ext/handle_pixel/theme.php index 0ffebd77..da3e7f4b 100644 --- a/ext/handle_pixel/theme.php +++ b/ext/handle_pixel/theme.php @@ -8,7 +8,7 @@ use function MicroHTML\IMG; class PixelFileHandlerTheme extends Themelet { - public function display_image(Image $image) + public function display_image(Image $image): void { global $config, $page; @@ -25,7 +25,7 @@ class PixelFileHandlerTheme extends Themelet $page->add_block(new Block("Image", $html, "main", 10)); } - public function display_metadata(Image $image) + public function display_metadata(Image $image): void { global $page; diff --git a/ext/handle_svg/theme.php b/ext/handle_svg/theme.php index a9fd63df..a37d0051 100644 --- a/ext/handle_svg/theme.php +++ b/ext/handle_svg/theme.php @@ -6,7 +6,7 @@ namespace Shimmie2; class SVGFileHandlerTheme extends Themelet { - public function display_image(Image $image) + public function display_image(Image $image): void { global $page; $ilink = make_link("get_svg/{$image->id}/{$image->id}.svg"); diff --git a/ext/handle_video/theme.php b/ext/handle_video/theme.php index dcb70208..24664cc0 100644 --- a/ext/handle_video/theme.php +++ b/ext/handle_video/theme.php @@ -8,7 +8,7 @@ use function MicroHTML\{A, BR, VIDEO, SOURCE, emptyHTML}; class VideoFileHandlerTheme extends Themelet { - public function display_image(Image $image) + public function display_image(Image $image): void { global $config, $page; diff --git a/ext/help_pages/theme.php b/ext/help_pages/theme.php index a3987c42..60c6a426 100644 --- a/ext/help_pages/theme.php +++ b/ext/help_pages/theme.php @@ -6,7 +6,7 @@ namespace Shimmie2; class HelpPagesTheme extends Themelet { - public function display_list_page(array $pages) + public function display_list_page(array $pages): void { global $page; @@ -23,7 +23,7 @@ class HelpPagesTheme extends Themelet $page->add_block(new Block("Help Pages", "See list of pages to left")); } - public function display_help_page(string $title) + public function display_help_page(string $title): void { global $page; diff --git a/ext/holiday/theme.php b/ext/holiday/theme.php index 762e0b99..b1504ccc 100644 --- a/ext/holiday/theme.php +++ b/ext/holiday/theme.php @@ -6,7 +6,7 @@ namespace Shimmie2; class HolidayTheme extends Themelet { - public function display_holiday(?string $holiday) + public function display_holiday(?string $holiday): void { global $page; if ($holiday) { diff --git a/ext/index/theme.php b/ext/index/theme.php index 9932eb1f..6b7eac27 100644 --- a/ext/index/theme.php +++ b/ext/index/theme.php @@ -22,7 +22,7 @@ class IndexTheme extends Themelet $this->search_terms = $search_terms; } - public function display_intro(Page $page) + public function display_intro(Page $page): void { $text = "
@@ -44,7 +44,7 @@ and of course start organising your images :-) /** * @param Image[] $images */ - public function display_page(Page $page, array $images) + public function display_page(Page $page, array $images): void { $this->display_shortwiki($page); @@ -63,7 +63,7 @@ and of course start organising your images :-) /** * @param string[] $parts */ - public function display_admin_block(array $parts) + public function display_admin_block(array $parts): void { global $page; $page->add_block(new Block("List Controls", join("
", $parts), "left", 50)); diff --git a/ext/ipban/theme.php b/ext/ipban/theme.php index 996b40a7..6697a065 100644 --- a/ext/ipban/theme.php +++ b/ext/ipban/theme.php @@ -6,7 +6,7 @@ namespace Shimmie2; class IPBanTheme extends Themelet { - public function display_bans(Page $page, $table, $paginator) + public function display_bans(Page $page, $table, $paginator): void { $html = " Show All Active / diff --git a/ext/log_db/theme.php b/ext/log_db/theme.php index fa12da1b..a44c0ed9 100644 --- a/ext/log_db/theme.php +++ b/ext/log_db/theme.php @@ -6,7 +6,7 @@ namespace Shimmie2; class LogDatabaseTheme extends Themelet { - public function display_events($table, $paginator) + public function display_events($table, $paginator): void { global $page; $page->set_title("Event Log"); diff --git a/ext/not_a_tag/theme.php b/ext/not_a_tag/theme.php index 7c23a7a3..1d2a1390 100644 --- a/ext/not_a_tag/theme.php +++ b/ext/not_a_tag/theme.php @@ -6,7 +6,7 @@ namespace Shimmie2; class NotATagTheme extends Themelet { - public function display_untags(Page $page, $table, $paginator) + public function display_untags(Page $page, $table, $paginator): void { $page->set_title("UnTags"); $page->set_heading("UnTags"); diff --git a/ext/notes/theme.php b/ext/notes/theme.php index 0755eba6..a619ad00 100644 --- a/ext/notes/theme.php +++ b/ext/notes/theme.php @@ -74,7 +74,7 @@ class NotesTheme extends Themelet } - public function display_note_list($images, $pageNumber, $totalPages) + public function display_note_list($images, $pageNumber, $totalPages): void { global $page; $pool_images = ''; @@ -94,7 +94,7 @@ class NotesTheme extends Themelet $page->add_block(new Block("Notes", $pool_images, "main", 20)); } - public function display_note_requests($images, $pageNumber, $totalPages) + public function display_note_requests($images, $pageNumber, $totalPages): void { global $page; @@ -157,7 +157,7 @@ class NotesTheme extends Themelet return $html; } - public function display_histories($histories, $pageNumber, $totalPages) + public function display_histories($histories, $pageNumber, $totalPages): void { global $page; @@ -170,7 +170,7 @@ class NotesTheme extends Themelet $this->display_paginator($page, "note/updated", null, $pageNumber, $totalPages); } - public function display_history($histories, $pageNumber, $totalPages) + public function display_history($histories, $pageNumber, $totalPages): void { global $page; diff --git a/ext/pm/theme.php b/ext/pm/theme.php index c80e7f50..26817382 100644 --- a/ext/pm/theme.php +++ b/ext/pm/theme.php @@ -6,7 +6,7 @@ namespace Shimmie2; class PrivMsgTheme extends Themelet { - public function display_pms(Page $page, $pms) + public function display_pms(Page $page, $pms): void { global $user; @@ -58,7 +58,7 @@ class PrivMsgTheme extends Themelet $page->add_block(new Block("Private Messages", $html, "main", 40, "private-messages")); } - public function display_composer(Page $page, User $from, User $to, $subject = "") + public function display_composer(Page $page, User $from, User $to, $subject = ""): void { global $user; $post_url = make_link("pm/send"); @@ -79,7 +79,7 @@ EOD; $page->add_block(new Block("Write a PM", $html, "main", 50)); } - public function display_message(Page $page, User $from, User $to, PM $pm) + public function display_message(Page $page, User $from, User $to, PM $pm): void { $page->set_title("Private Message"); $page->set_heading(html_escape($pm->subject)); diff --git a/ext/random_image/theme.php b/ext/random_image/theme.php index 6150609b..198598da 100644 --- a/ext/random_image/theme.php +++ b/ext/random_image/theme.php @@ -10,7 +10,7 @@ use function MicroHTML\IMG; class RandomImageTheme extends Themelet { - public function display_random(Page $page, Image $image) + public function display_random(Page $page, Image $image): void { $page->add_block(new Block("Random Post", $this->build_random_html($image), "left", 8)); } diff --git a/ext/random_list/theme.php b/ext/random_list/theme.php index 8ccd5134..be0aef7c 100644 --- a/ext/random_list/theme.php +++ b/ext/random_list/theme.php @@ -19,7 +19,7 @@ class RandomListTheme extends Themelet /** * @param Image[] $images */ - public function display_page(Page $page, array $images) + public function display_page(Page $page, array $images): void { $page->title = "Random Posts"; diff --git a/ext/rating/theme.php b/ext/rating/theme.php index a3bb0cd0..51c3c466 100644 --- a/ext/rating/theme.php +++ b/ext/rating/theme.php @@ -25,7 +25,7 @@ class RatingsTheme extends Themelet ); } - public function display_form(array $current_ratings) + public function display_form(array $current_ratings): void { global $page; diff --git a/ext/regen_thumb/theme.php b/ext/regen_thumb/theme.php index 3b720562..9a0d2ab1 100644 --- a/ext/regen_thumb/theme.php +++ b/ext/regen_thumb/theme.php @@ -23,7 +23,7 @@ class RegenThumbTheme extends Themelet /** * Show a link to the new thumbnail. */ - public function display_results(Page $page, Image $image) + public function display_results(Page $page, Image $image): void { $page->set_title("Thumbnail Regenerated"); $page->set_heading("Thumbnail Regenerated"); diff --git a/ext/replace_file/theme.php b/ext/replace_file/theme.php index 133145dd..1eca111c 100644 --- a/ext/replace_file/theme.php +++ b/ext/replace_file/theme.php @@ -16,7 +16,7 @@ class ReplaceFileTheme extends Themelet /** * Only allows 1 file to be uploaded - for replacing another image file. */ - public function display_replace_page(Page $page, int $image_id) + public function display_replace_page(Page $page, int $image_id): void { global $config, $page; $tl_enabled = ($config->get_string(UploadConfig::TRANSLOAD_ENGINE, "none") != "none"); diff --git a/ext/report_image/theme.php b/ext/report_image/theme.php index 91af0b05..dfd07fbd 100644 --- a/ext/report_image/theme.php +++ b/ext/report_image/theme.php @@ -8,7 +8,7 @@ use function MicroHTML\INPUT; class ReportImageTheme extends Themelet { - public function display_reported_images(Page $page, array $reports) + public function display_reported_images(Page $page, array $reports): void { global $config, $user; @@ -58,7 +58,7 @@ class ReportImageTheme extends Themelet /** * @param ImageReport[] $reports */ - public function display_image_banner(Image $image, array $reports) + public function display_image_banner(Image $image, array $reports): void { global $config, $page; diff --git a/ext/resize/theme.php b/ext/resize/theme.php index 44937b1f..384a27c0 100644 --- a/ext/resize/theme.php +++ b/ext/resize/theme.php @@ -38,7 +38,7 @@ class ResizeImageTheme extends Themelet return $html; } - public function display_resize_error(Page $page, string $title, string $message) + public function display_resize_error(Page $page, string $title, string $message): void { $page->set_title("Resize Image"); $page->set_heading("Resize Image"); diff --git a/ext/rotate/theme.php b/ext/rotate/theme.php index a0d6f7e9..b5e0ba79 100644 --- a/ext/rotate/theme.php +++ b/ext/rotate/theme.php @@ -24,7 +24,7 @@ class RotateImageTheme extends Themelet /** * Display the error. */ - public function display_rotate_error(Page $page, string $title, string $message) + public function display_rotate_error(Page $page, string $title, string $message): void { $page->set_title("Rotate Image"); $page->set_heading("Rotate Image"); diff --git a/ext/setup/theme.php b/ext/setup/theme.php index 0baa14ca..feee9949 100644 --- a/ext/setup/theme.php +++ b/ext/setup/theme.php @@ -17,7 +17,7 @@ class SetupTheme extends Themelet * * The page should wrap all the options in a form which links to setup_save */ - public function display_page(Page $page, SetupPanel $panel) + public function display_page(Page $page, SetupPanel $panel): void { usort($panel->blocks, "Shimmie2\blockcmp"); @@ -43,7 +43,7 @@ class SetupTheme extends Themelet $page->add_block(new Block("Setup", $table)); } - public function display_advanced(Page $page, $options) + public function display_advanced(Page $page, $options): void { $h_rows = ""; ksort($options); diff --git a/ext/source_history/theme.php b/ext/source_history/theme.php index 7c6a106b..d7558d60 100644 --- a/ext/source_history/theme.php +++ b/ext/source_history/theme.php @@ -14,7 +14,7 @@ class SourceHistoryTheme extends Themelet { private array $messages = []; - public function display_history_page(Page $page, int $image_id, array $history) + public function display_history_page(Page $page, int $image_id, array $history): void { $history_html = $this->history_list($history, true); @@ -24,7 +24,7 @@ class SourceHistoryTheme extends Themelet $page->add_block(new Block("Source History", $history_html, "main", 10)); } - public function display_global_page(Page $page, array $history, int $page_number) + public function display_global_page(Page $page, array $history, int $page_number): void { $history_html = $this->history_list($history, false); @@ -44,7 +44,7 @@ class SourceHistoryTheme extends Themelet /** * Add a section to the admin page. */ - public function display_admin_block(string $validation_msg = '') + public function display_admin_block(string $validation_msg = ''): void { global $page; @@ -71,7 +71,7 @@ class SourceHistoryTheme extends Themelet /* * Show a standard page for results to be put into */ - public function display_revert_ip_results() + public function display_revert_ip_results(): void { global $page; $html = implode("\n", $this->messages); diff --git a/ext/tag_edit/theme.php b/ext/tag_edit/theme.php index 325a390b..08e7997c 100644 --- a/ext/tag_edit/theme.php +++ b/ext/tag_edit/theme.php @@ -14,7 +14,7 @@ class TagEditTheme extends Themelet * Display a form which links to tag_edit/replace with POST[search] * and POST[replace] set appropriately */ - public function display_mass_editor() + public function display_mass_editor(): void { global $page; $html = " diff --git a/ext/tag_history/theme.php b/ext/tag_history/theme.php index 95ead7da..9e869f24 100644 --- a/ext/tag_history/theme.php +++ b/ext/tag_history/theme.php @@ -15,7 +15,7 @@ class TagHistoryTheme extends Themelet { private array $messages = []; - public function display_history_page(Page $page, int $image_id, array $history) + public function display_history_page(Page $page, int $image_id, array $history): void { $history_html = $this->history_list($history, true); @@ -25,7 +25,7 @@ class TagHistoryTheme extends Themelet $page->add_block(new Block("Tag History", $history_html, "main", 10)); } - public function display_global_page(Page $page, array $history, int $page_number) + public function display_global_page(Page $page, array $history, int $page_number): void { $history_html = $this->history_list($history, false); @@ -45,7 +45,7 @@ class TagHistoryTheme extends Themelet /** * Add a section to the admin page. */ - public function display_admin_block(string $validation_msg = '') + public function display_admin_block(string $validation_msg = ''): void { global $page; @@ -72,7 +72,7 @@ class TagHistoryTheme extends Themelet /* * Show a standard page for results to be put into */ - public function display_revert_ip_results() + public function display_revert_ip_results(): void { global $page; $html = implode("\n", $this->messages); diff --git a/ext/tag_list/theme.php b/ext/tag_list/theme.php index d1d85ce4..1116a10a 100644 --- a/ext/tag_list/theme.php +++ b/ext/tag_list/theme.php @@ -26,7 +26,7 @@ class TagListTheme extends Themelet $this->navigation = $nav; } - public function display_page(Page $page) + public function display_page(Page $page): void { $page->set_title("Tag List"); $page->set_heading($this->heading); @@ -66,7 +66,7 @@ class TagListTheme extends Themelet * ... * ) */ - public function display_split_related_block(Page $page, $tag_infos) + public function display_split_related_block(Page $page, $tag_infos): void { global $config; @@ -162,7 +162,7 @@ class TagListTheme extends Themelet * ... * ) */ - public function display_related_block(Page $page, $tag_infos, $block_name) + public function display_related_block(Page $page, $tag_infos, $block_name): void { global $config; @@ -181,7 +181,7 @@ class TagListTheme extends Themelet * ... * ) */ - public function display_popular_block(Page $page, $tag_infos) + public function display_popular_block(Page $page, $tag_infos): void { global $config; @@ -201,7 +201,7 @@ class TagListTheme extends Themelet * ) * $search = the current array of tags being searched for */ - public function display_refine_block(Page $page, $tag_infos, $search) + public function display_refine_block(Page $page, $tag_infos, $search): void { global $config; diff --git a/ext/tag_tools/theme.php b/ext/tag_tools/theme.php index 7cf2ea72..7a365401 100644 --- a/ext/tag_tools/theme.php +++ b/ext/tag_tools/theme.php @@ -28,7 +28,7 @@ class TagToolsTheme extends Themelet * 'recount tag use' * etc */ - public function display_form() + public function display_form(): void { global $page; diff --git a/ext/update/theme.php b/ext/update/theme.php index a990a4a7..64a640cd 100644 --- a/ext/update/theme.php +++ b/ext/update/theme.php @@ -6,7 +6,7 @@ namespace Shimmie2; class UpdateTheme extends Themelet { - public function display_admin_block() + public function display_admin_block(): void { global $page, $config; diff --git a/ext/user/theme.php b/ext/user/theme.php index 3432e2aa..77996fd1 100644 --- a/ext/user/theme.php +++ b/ext/user/theme.php @@ -25,7 +25,7 @@ use function MicroHTML\OPTION; class UserPageTheme extends Themelet { - public function display_login_page(Page $page) + public function display_login_page(Page $page): void { $page->set_title("Login"); $page->set_heading("Login"); @@ -36,7 +36,7 @@ class UserPageTheme extends Themelet )); } - public function display_user_list(Page $page, $table, $paginator) + public function display_user_list(Page $page, $table, $paginator): void { $page->set_title("User List"); $page->set_heading("User List"); @@ -44,12 +44,12 @@ class UserPageTheme extends Themelet $page->add_block(new Block("Users", $table . $paginator)); } - public function display_user_links(Page $page, User $user, $parts) + public function display_user_links(Page $page, User $user, $parts): void { # $page->add_block(new Block("User Links", join(", ", $parts), "main", 10)); } - public function display_user_block(Page $page, User $user, $parts) + public function display_user_block(Page $page, User $user, $parts): void { $html = emptyHTML('Logged in as ', $user->name); foreach ($parts as $part) { @@ -61,7 +61,7 @@ class UserPageTheme extends Themelet $page->add_block($b); } - public function display_signup_page(Page $page) + public function display_signup_page(Page $page): void { global $config, $user; $tac = $config->get_string("login_tac", ""); @@ -117,7 +117,7 @@ class UserPageTheme extends Themelet $page->add_block(new Block("Signup", $html)); } - public function display_user_creator() + public function display_user_creator(): void { global $page; @@ -154,7 +154,7 @@ class UserPageTheme extends Themelet $page->add_block(new Block("Create User", (string)$form, "main", 75)); } - public function display_signups_disabled(Page $page) + public function display_signups_disabled(Page $page): void { $page->set_title("Signups Disabled"); $page->set_heading("Signups Disabled"); @@ -165,7 +165,7 @@ class UserPageTheme extends Themelet )); } - public function display_login_block(Page $page) + public function display_login_block(Page $page): void { $page->add_block(new Block("Login", $this->create_login_block(), "left", 90)); } @@ -218,7 +218,7 @@ class UserPageTheme extends Themelet return $td; } - public function display_ip_list(Page $page, array $uploads, array $comments, array $events) + public function display_ip_list(Page $page, array $uploads, array $comments, array $events): void { $html = TABLE( ["id" => "ip-history"], @@ -235,7 +235,7 @@ class UserPageTheme extends Themelet $page->add_block(new Block("IPs", $html, "main", 70)); } - public function display_user_page(User $duser, $stats) + public function display_user_page(User $duser, $stats): void { global $page; assert(is_array($stats)); diff --git a/ext/user_config/theme.php b/ext/user_config/theme.php index 7d5209da..6e8593c3 100644 --- a/ext/user_config/theme.php +++ b/ext/user_config/theme.php @@ -39,7 +39,7 @@ class UserConfigTheme extends Themelet * * The page should wrap all the options in a form which links to setup_save */ - public function display_user_config_page(Page $page, User $user, SetupPanel $panel) + public function display_user_config_page(Page $page, User $user, SetupPanel $panel): void { usort($panel->blocks, "Shimmie2\blockcmp"); diff --git a/ext/view/theme.php b/ext/view/theme.php index 84efbf01..c38ca4c6 100644 --- a/ext/view/theme.php +++ b/ext/view/theme.php @@ -10,7 +10,7 @@ use function MicroHTML\{A, joinHTML, TABLE, TR, TD, INPUT, emptyHTML}; class ViewPostTheme extends Themelet { - public function display_meta_headers(Image $image) + public function display_meta_headers(Image $image): void { global $page; @@ -25,7 +25,7 @@ class ViewPostTheme extends Themelet /* * Build a page showing $image and some info about it */ - public function display_page(Image $image, $editor_parts) + public function display_page(Image $image, $editor_parts): void { global $page; $page->set_title("Post {$image->id}: ".$image->get_tag_list()); @@ -41,7 +41,7 @@ class ViewPostTheme extends Themelet } } - public function display_admin_block(Page $page, $parts) + public function display_admin_block(Page $page, $parts): void { if (count($parts) > 0) { $page->add_block(new Block("Post Controls", join("
", $parts), "left", 50)); diff --git a/ext/wiki/theme.php b/ext/wiki/theme.php index 2d4dfd02..861ed4aa 100644 --- a/ext/wiki/theme.php +++ b/ext/wiki/theme.php @@ -12,7 +12,7 @@ class WikiTheme extends Themelet * $wiki_page The wiki page, has ->title and ->body * $nav_page A wiki page object with navigation, has ->body */ - public function display_page(Page $page, WikiPage $wiki_page, ?WikiPage $nav_page = null) + public function display_page(Page $page, WikiPage $wiki_page, ?WikiPage $nav_page = null): void { global $user; @@ -47,7 +47,7 @@ class WikiTheme extends Themelet $page->add_block(new Block($title_html, $this->create_display_html($wiki_page))); } - public function display_page_history(Page $page, string $title, array $history) + public function display_page_history(Page $page, string $title, array $history): void { $html = ""; foreach ($history as $row) { @@ -61,7 +61,7 @@ class WikiTheme extends Themelet $page->add_block(new Block(html_escape($title), $html)); } - public function display_page_editor(Page $page, WikiPage $wiki_page) + public function display_page_editor(Page $page, WikiPage $wiki_page): void { $page->set_title(html_escape($wiki_page->title)); $page->set_heading(html_escape($wiki_page->title)); diff --git a/themes/danbooru/comment.theme.php b/themes/danbooru/comment.theme.php index 935a560c..3249679d 100644 --- a/themes/danbooru/comment.theme.php +++ b/themes/danbooru/comment.theme.php @@ -6,7 +6,7 @@ namespace Shimmie2; class CustomCommentListTheme extends CommentListTheme { - public function display_comment_list(array $images, int $page_number, int $total_pages, bool $can_post) + public function display_comment_list(array $images, int $page_number, int $total_pages, bool $can_post): void { global $config, $page, $user; @@ -85,7 +85,7 @@ class CustomCommentListTheme extends CommentListTheme } } - public function display_recent_comments(array $comments) + public function display_recent_comments(array $comments): void { // no recent comments in this theme } diff --git a/themes/danbooru/index.theme.php b/themes/danbooru/index.theme.php index 8dd0aa9c..80f00517 100644 --- a/themes/danbooru/index.theme.php +++ b/themes/danbooru/index.theme.php @@ -9,7 +9,7 @@ class CustomIndexTheme extends IndexTheme /** * @param Image[] $images */ - public function display_page(Page $page, array $images) + public function display_page(Page $page, array $images): void { $this->display_shortwiki($page); diff --git a/themes/danbooru/tag_list.theme.php b/themes/danbooru/tag_list.theme.php index 4dd0bb02..118019e0 100644 --- a/themes/danbooru/tag_list.theme.php +++ b/themes/danbooru/tag_list.theme.php @@ -6,7 +6,7 @@ namespace Shimmie2; class CustomTagListTheme extends TagListTheme { - public function display_page(Page $page) + public function display_page(Page $page): void { $page->disable_left(); parent::display_page($page); diff --git a/themes/danbooru/themelet.class.php b/themes/danbooru/themelet.class.php index 4b7a1a2a..422c62ec 100644 --- a/themes/danbooru/themelet.class.php +++ b/themes/danbooru/themelet.class.php @@ -10,7 +10,7 @@ use function MicroHTML\{A, B, DIV, joinHTML}; class Themelet extends BaseThemelet { - public function display_paginator(Page $page, string $base, ?string $query, int $page_number, int $total_pages, bool $show_random = false) + public function display_paginator(Page $page, string $base, ?string $query, int $page_number, int $total_pages, bool $show_random = false): void { if ($total_pages == 0) { $total_pages = 1; diff --git a/themes/danbooru/user.theme.php b/themes/danbooru/user.theme.php index 276dd53f..a78bbde2 100644 --- a/themes/danbooru/user.theme.php +++ b/themes/danbooru/user.theme.php @@ -6,7 +6,7 @@ namespace Shimmie2; class CustomUserPageTheme extends UserPageTheme { - public function display_login_page(Page $page) + public function display_login_page(Page $page): void { global $config; $page->set_title("Login"); @@ -33,16 +33,16 @@ class CustomUserPageTheme extends UserPageTheme $page->add_block(new Block("Login", $html, "main", 90)); } - public function display_user_links(Page $page, User $user, $parts) + public function display_user_links(Page $page, User $user, $parts): void { // no block in this theme } - public function display_login_block(Page $page) + public function display_login_block(Page $page): void { // no block in this theme } - public function display_user_block(Page $page, User $user, $parts) + public function display_user_block(Page $page, User $user, $parts): void { $html = ""; $blocked = ["Pools", "Pool Changes", "Alias Editor", "My Profile"]; @@ -57,7 +57,7 @@ class CustomUserPageTheme extends UserPageTheme $page->add_block($b); } - public function display_signup_page(Page $page) + public function display_signup_page(Page $page): void { global $config; $tac = $config->get_string("login_tac", ""); @@ -91,7 +91,7 @@ class CustomUserPageTheme extends UserPageTheme $page->add_block(new Block("Signup", $html)); } - public function display_ip_list(Page $page, array $uploads, array $comments, array $events) + public function display_ip_list(Page $page, array $uploads, array $comments, array $events): void { $html = "
"; $html .= "
Uploaded from: "; @@ -108,7 +108,7 @@ class CustomUserPageTheme extends UserPageTheme $page->add_block(new Block("IPs", $html)); } - public function display_user_page(User $duser, $stats) + public function display_user_page(User $duser, $stats): void { global $page; $page->disable_left(); diff --git a/themes/danbooru/view.theme.php b/themes/danbooru/view.theme.php index 121a93dc..1fc77387 100644 --- a/themes/danbooru/view.theme.php +++ b/themes/danbooru/view.theme.php @@ -6,7 +6,7 @@ namespace Shimmie2; class CustomViewPostTheme extends ViewPostTheme { - public function display_page(Image $image, $editor_parts) + public function display_page(Image $image, $editor_parts): void { global $page; $page->set_heading(html_escape($image->get_tag_list())); diff --git a/themes/danbooru2/admin.theme.php b/themes/danbooru2/admin.theme.php index 1d8082f6..56393863 100644 --- a/themes/danbooru2/admin.theme.php +++ b/themes/danbooru2/admin.theme.php @@ -6,7 +6,7 @@ namespace Shimmie2; class CustomAdminPageTheme extends AdminPageTheme { - public function display_page() + public function display_page(): void { global $page; $page->disable_left(); diff --git a/themes/danbooru2/comment.theme.php b/themes/danbooru2/comment.theme.php index 4ca014e9..d94709ee 100644 --- a/themes/danbooru2/comment.theme.php +++ b/themes/danbooru2/comment.theme.php @@ -6,7 +6,7 @@ namespace Shimmie2; class CustomCommentListTheme extends CommentListTheme { - public function display_comment_list(array $images, int $page_number, int $total_pages, bool $can_post) + public function display_comment_list(array $images, int $page_number, int $total_pages, bool $can_post): void { global $config, $page, $user; @@ -85,7 +85,7 @@ class CustomCommentListTheme extends CommentListTheme } } - public function display_recent_comments(array $comments) + public function display_recent_comments(array $comments): void { // no recent comments in this theme } diff --git a/themes/danbooru2/ext_manager.theme.php b/themes/danbooru2/ext_manager.theme.php index bdc7b0c2..1d283157 100644 --- a/themes/danbooru2/ext_manager.theme.php +++ b/themes/danbooru2/ext_manager.theme.php @@ -6,13 +6,13 @@ namespace Shimmie2; class CustomExtManagerTheme extends ExtManagerTheme { - public function display_table(Page $page, array $extensions, bool $editable) + public function display_table(Page $page, array $extensions, bool $editable): void { $page->disable_left(); parent::display_table($page, $extensions, $editable); } - public function display_doc(Page $page, ExtensionInfo $info) + public function display_doc(Page $page, ExtensionInfo $info): void { $page->disable_left(); parent::display_doc($page, $info); diff --git a/themes/danbooru2/index.theme.php b/themes/danbooru2/index.theme.php index e1fa8aa4..6f7d9808 100644 --- a/themes/danbooru2/index.theme.php +++ b/themes/danbooru2/index.theme.php @@ -9,7 +9,7 @@ class CustomIndexTheme extends IndexTheme /** * @param Image[] $images */ - public function display_page(Page $page, array $images) + public function display_page(Page $page, array $images): void { $this->display_shortwiki($page); diff --git a/themes/danbooru2/tag_list.theme.php b/themes/danbooru2/tag_list.theme.php index 4dd0bb02..118019e0 100644 --- a/themes/danbooru2/tag_list.theme.php +++ b/themes/danbooru2/tag_list.theme.php @@ -6,7 +6,7 @@ namespace Shimmie2; class CustomTagListTheme extends TagListTheme { - public function display_page(Page $page) + public function display_page(Page $page): void { $page->disable_left(); parent::display_page($page); diff --git a/themes/danbooru2/themelet.class.php b/themes/danbooru2/themelet.class.php index 7e619442..5f810471 100644 --- a/themes/danbooru2/themelet.class.php +++ b/themes/danbooru2/themelet.class.php @@ -10,7 +10,7 @@ use function MicroHTML\{A,B,DIV,joinHTML}; class Themelet extends BaseThemelet { - public function display_paginator(Page $page, string $base, ?string $query, int $page_number, int $total_pages, bool $show_random = false) + public function display_paginator(Page $page, string $base, ?string $query, int $page_number, int $total_pages, bool $show_random = false): void { if ($total_pages == 0) { $total_pages = 1; diff --git a/themes/danbooru2/user.theme.php b/themes/danbooru2/user.theme.php index 276dd53f..a78bbde2 100644 --- a/themes/danbooru2/user.theme.php +++ b/themes/danbooru2/user.theme.php @@ -6,7 +6,7 @@ namespace Shimmie2; class CustomUserPageTheme extends UserPageTheme { - public function display_login_page(Page $page) + public function display_login_page(Page $page): void { global $config; $page->set_title("Login"); @@ -33,16 +33,16 @@ class CustomUserPageTheme extends UserPageTheme $page->add_block(new Block("Login", $html, "main", 90)); } - public function display_user_links(Page $page, User $user, $parts) + public function display_user_links(Page $page, User $user, $parts): void { // no block in this theme } - public function display_login_block(Page $page) + public function display_login_block(Page $page): void { // no block in this theme } - public function display_user_block(Page $page, User $user, $parts) + public function display_user_block(Page $page, User $user, $parts): void { $html = ""; $blocked = ["Pools", "Pool Changes", "Alias Editor", "My Profile"]; @@ -57,7 +57,7 @@ class CustomUserPageTheme extends UserPageTheme $page->add_block($b); } - public function display_signup_page(Page $page) + public function display_signup_page(Page $page): void { global $config; $tac = $config->get_string("login_tac", ""); @@ -91,7 +91,7 @@ class CustomUserPageTheme extends UserPageTheme $page->add_block(new Block("Signup", $html)); } - public function display_ip_list(Page $page, array $uploads, array $comments, array $events) + public function display_ip_list(Page $page, array $uploads, array $comments, array $events): void { $html = ""; $html .= "
Uploaded from: "; @@ -108,7 +108,7 @@ class CustomUserPageTheme extends UserPageTheme $page->add_block(new Block("IPs", $html)); } - public function display_user_page(User $duser, $stats) + public function display_user_page(User $duser, $stats): void { global $page; $page->disable_left(); diff --git a/themes/danbooru2/view.theme.php b/themes/danbooru2/view.theme.php index bfc44db0..3141f41e 100644 --- a/themes/danbooru2/view.theme.php +++ b/themes/danbooru2/view.theme.php @@ -6,7 +6,7 @@ namespace Shimmie2; class CustomViewPostTheme extends ViewPostTheme { - public function display_page(Image $image, $editor_parts) + public function display_page(Image $image, $editor_parts): void { global $page; $page->set_heading(html_escape($image->get_tag_list())); diff --git a/themes/futaba/themelet.class.php b/themes/futaba/themelet.class.php index e059b3c2..1c0f53e6 100644 --- a/themes/futaba/themelet.class.php +++ b/themes/futaba/themelet.class.php @@ -9,7 +9,7 @@ class Themelet extends BaseThemelet /** * Add a generic paginator. */ - public function display_paginator(Page $page, string $base, ?string $query, int $page_number, int $total_pages, bool $show_random = false) + public function display_paginator(Page $page, string $base, ?string $query, int $page_number, int $total_pages, bool $show_random = false): void { if ($total_pages == 0) { $total_pages = 1; diff --git a/themes/futaba/view.theme.php b/themes/futaba/view.theme.php index 7f4a9f19..6370969c 100644 --- a/themes/futaba/view.theme.php +++ b/themes/futaba/view.theme.php @@ -6,7 +6,7 @@ namespace Shimmie2; class CustomViewPostTheme extends ViewPostTheme { - public function display_page(Image $image, $editor_parts) + public function display_page(Image $image, $editor_parts): void { global $page; $page->set_heading(html_escape($image->get_tag_list())); diff --git a/themes/lite/themelet.class.php b/themes/lite/themelet.class.php index fd293a38..1717e769 100644 --- a/themes/lite/themelet.class.php +++ b/themes/lite/themelet.class.php @@ -10,7 +10,7 @@ use function MicroHTML\{A,DIV,SPAN,joinHTML}; class Themelet extends BaseThemelet { - public function display_paginator(Page $page, string $base, ?string $query, int $page_number, int $total_pages, bool $show_random = false) + public function display_paginator(Page $page, string $base, ?string $query, int $page_number, int $total_pages, bool $show_random = false): void { if ($total_pages == 0) { $total_pages = 1; diff --git a/themes/lite/user.theme.php b/themes/lite/user.theme.php index 14327f6d..5ac89f24 100644 --- a/themes/lite/user.theme.php +++ b/themes/lite/user.theme.php @@ -6,7 +6,7 @@ namespace Shimmie2; class CustomUserPageTheme extends UserPageTheme { - public function display_login_page(Page $page) + public function display_login_page(Page $page): void { global $config; $page->set_title("Login"); @@ -33,16 +33,16 @@ class CustomUserPageTheme extends UserPageTheme $page->add_block(new Block("Login", $html, "main", 90)); } - public function display_user_links(Page $page, User $user, $parts) + public function display_user_links(Page $page, User $user, $parts): void { // no block in this theme } - public function display_login_block(Page $page) + public function display_login_block(Page $page): void { // no block in this theme } - public function display_user_block(Page $page, User $user, $parts) + public function display_user_block(Page $page, User $user, $parts): void { $html = ""; $blocked = ["Pools", "Pool Changes", "Alias Editor", "My Profile"]; @@ -57,13 +57,13 @@ class CustomUserPageTheme extends UserPageTheme $page->add_block($b); } - public function display_signup_page(Page $page) + public function display_signup_page(Page $page): void { $page->disable_left(); parent::display_signup_page($page); } - public function display_ip_list(Page $page, array $uploads, array $comments, array $events) + public function display_ip_list(Page $page, array $uploads, array $comments, array $events): void { $html = ""; $html .= "
Uploaded from: "; @@ -80,7 +80,7 @@ class CustomUserPageTheme extends UserPageTheme $page->add_block(new Block("IPs", $html)); } - public function display_user_page(User $duser, $stats) + public function display_user_page(User $duser, $stats): void { global $page; $page->disable_left(); diff --git a/themes/lite/view.theme.php b/themes/lite/view.theme.php index 7b0f018b..b887ab7d 100644 --- a/themes/lite/view.theme.php +++ b/themes/lite/view.theme.php @@ -6,7 +6,7 @@ namespace Shimmie2; class CustomViewPostTheme extends ViewPostTheme { - public function display_page(Image $image, $editor_parts) + public function display_page(Image $image, $editor_parts): void { global $page; $page->set_title("Post {$image->id}: ".$image->get_tag_list()); diff --git a/themes/rule34v2/index.theme.php b/themes/rule34v2/index.theme.php index 1ac3b8ac..ebbaf1f8 100644 --- a/themes/rule34v2/index.theme.php +++ b/themes/rule34v2/index.theme.php @@ -26,7 +26,7 @@ class CustomIndexTheme extends IndexTheme } // Override to add a custom error message - public function display_page(Page $page, $images) + public function display_page(Page $page, $images): void { $this->display_page_header($page, $images); diff --git a/themes/rule34v2/user.theme.php b/themes/rule34v2/user.theme.php index 600d90d6..eee5257d 100644 --- a/themes/rule34v2/user.theme.php +++ b/themes/rule34v2/user.theme.php @@ -27,7 +27,7 @@ class CustomUserPageTheme extends UserPageTheme // (with css media queries deciding which one is visible), and also // to switch between new-line and inline display depending on the // number of links. - public function display_user_block(Page $page, User $user, $parts) + public function display_user_block(Page $page, User $user, $parts): void { $h_name = html_escape($user->name); $lines = []; @@ -48,7 +48,7 @@ class CustomUserPageTheme extends UserPageTheme // Override to display login block in the head and in the left column // (with css media queries deciding which one is visible) - public function display_login_block(Page $page) + public function display_login_block(Page $page): void { $page->add_block(new Block("Login", $this->create_login_block(), "head", 90)); $page->add_block(new Block("Login", $this->create_login_block(), "left", 15)); diff --git a/themes/warm/user.theme.php b/themes/warm/user.theme.php index a58e9ceb..7904a34e 100644 --- a/themes/warm/user.theme.php +++ b/themes/warm/user.theme.php @@ -6,7 +6,7 @@ namespace Shimmie2; class CustomUserPageTheme extends UserPageTheme { - public function display_user_block(Page $page, User $user, $parts) + public function display_user_block(Page $page, User $user, $parts): void { $h_name = html_escape($user->name); $html = " | "; @@ -16,7 +16,7 @@ class CustomUserPageTheme extends UserPageTheme $page->add_block(new Block("Logged in as $h_name", $html, "head", 90)); } - public function display_login_block(Page $page) + public function display_login_block(Page $page): void { global $config; $html = "