";
diff --git a/themes/danbooru2/comment.theme.php b/themes/danbooru2/comment.theme.php
index c817fa09..f043f445 100644
--- a/themes/danbooru2/comment.theme.php
+++ b/themes/danbooru2/comment.theme.php
@@ -2,7 +2,7 @@
class CustomCommentListTheme extends CommentListTheme
{
- public function display_comment_list($images, $page_number, $total_pages, $can_post)
+ public function display_comment_list(array $images, int $page_number, int $total_pages, bool $can_post)
{
global $config, $page, $user;
@@ -82,13 +82,13 @@ class CustomCommentListTheme extends CommentListTheme
}
}
- public function display_recent_comments($comments)
+ public function display_recent_comments(array $comments)
{
// no recent comments in this theme
}
- protected function comment_to_html(Comment $comment, $trim=false)
+ protected function comment_to_html(Comment $comment, bool $trim=false): string
{
global $user;
diff --git a/themes/danbooru2/index.theme.php b/themes/danbooru2/index.theme.php
index e14202e9..51455d43 100644
--- a/themes/danbooru2/index.theme.php
+++ b/themes/danbooru2/index.theme.php
@@ -56,7 +56,7 @@ class CustomIndexTheme extends IndexTheme
/**
* #param Image[] $images
*/
- protected function build_table(array $images, string $query): string
+ protected function build_table(array $images, ?string $query): string
{
$h_query = html_escape($query);
$table = "
";
diff --git a/themes/futaba/comment.theme.php b/themes/futaba/comment.theme.php
index c871438c..2fd0a6ad 100644
--- a/themes/futaba/comment.theme.php
+++ b/themes/futaba/comment.theme.php
@@ -4,7 +4,7 @@ class CustomCommentListTheme extends CommentListTheme
{
public $inner_id = 0;
- public function display_comment_list($images, $page_number, $total_pages, $can_post)
+ public function display_comment_list(array $images, int $page_number, int $total_pages, bool $can_post)
{
global $config, $page;
@@ -49,7 +49,7 @@ class CustomCommentListTheme extends CommentListTheme
}
}
- public function display_recent_comments($comments)
+ public function display_recent_comments(array $comments)
{
// sidebar fails in this theme
}
@@ -60,7 +60,7 @@ class CustomCommentListTheme extends CommentListTheme
}
- protected function comment_to_html(Comment $comment, $trim=false)
+ protected function comment_to_html(Comment $comment, bool $trim=false): string
{
$inner_id = $this->inner_id; // because custom themes can't add params, because PHP
global $user;
diff --git a/themes/futaba/themelet.class.php b/themes/futaba/themelet.class.php
index 2e4c7a28..b84d3aae 100644
--- a/themes/futaba/themelet.class.php
+++ b/themes/futaba/themelet.class.php
@@ -5,7 +5,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)
{
if ($total_pages == 0) {
$total_pages = 1;
diff --git a/themes/lite/themelet.class.php b/themes/lite/themelet.class.php
index d96302ff..ef64903d 100644
--- a/themes/lite/themelet.class.php
+++ b/themes/lite/themelet.class.php
@@ -18,7 +18,7 @@ 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)
{
if ($total_pages == 0) {
$total_pages = 1;
@@ -27,7 +27,7 @@ class Themelet extends BaseThemelet
$page->add_block(new Block(null, $body, "main", 90));
}
- public function litetheme_gen_page_link(string $base_url, string $query, string $page, string $name, ?string $link_class=null): string
+ public function litetheme_gen_page_link(string $base_url, ?string $query, string $page, string $name, ?string $link_class=null): string
{
$link = make_link("$base_url/$page", $query);
return "
$name";