Skip to content

Commit 369f8a5

Browse files
committed
TMS-1173: Return type fix
1 parent 6e69827 commit 369f8a5

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

models/archive.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Archive extends Home {
1515
/**
1616
* Hooks
1717
*/
18-
public static function hooks() : void {
18+
public static function hooks(): void {
1919
add_action(
2020
'pre_get_posts',
2121
[ __CLASS__, 'modify_query' ]
@@ -27,7 +27,7 @@ public static function hooks() : void {
2727
*
2828
* @return int|null
2929
*/
30-
protected static function get_filter_category() : ?int {
30+
protected static function get_filter_category(): ?int {
3131
return is_tax() || is_category()
3232
? get_queried_object_id()
3333
: null;
@@ -40,7 +40,7 @@ protected static function get_filter_category() : ?int {
4040
*
4141
* @return void
4242
*/
43-
public static function modify_query( WP_Query $wp_query ) : void {
43+
public static function modify_query( WP_Query $wp_query ): void {
4444
if ( is_admin() || ( ! $wp_query->is_main_query() || ! $wp_query->is_archive() ) ) {
4545
return;
4646
}
@@ -57,7 +57,7 @@ public static function modify_query( WP_Query $wp_query ) : void {
5757
*
5858
* @return string|null
5959
*/
60-
public function page_title() : ?string {
60+
public function page_title(): ?string {
6161
return \single_term_title( '', false );
6262
}
6363

@@ -66,16 +66,16 @@ public function page_title() : ?string {
6666
*
6767
* @return string|null
6868
*/
69-
public function page_description() : ?string {
69+
public function page_description(): ?string {
7070
return \term_description( \get_queried_object() );
7171
}
7272

7373
/**
7474
* Get the blog-category image.
7575
*
76-
* @return string|null
76+
* @return int|null
7777
*/
78-
public function blog_category_image() {
78+
public function blog_category_image(): ?int {
7979
$queried_object = \get_queried_object();
8080
$image_field = \get_field( 'image', $queried_object );
8181

@@ -100,7 +100,7 @@ public function highlight() : ?object {
100100
*
101101
* @return array
102102
*/
103-
protected function get_filter_categories() : array {
103+
protected function get_filter_categories(): array {
104104
$queried_object = get_queried_object();
105105
$taxonomy = '';
106106

0 commit comments

Comments
 (0)