Skip to content

Commit 7e3a37a

Browse files
committed
phpstan fixes
1 parent 3daaa12 commit 7e3a37a

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

classes/class-page-types.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ public function update_option_page_on_front( $page_id ) {
356356
$posts = $this->get_posts_by_type( 'page', 'homepage' );
357357
$term = \get_term_by( 'slug', 'homepage', self::TAXONOMY_NAME );
358358

359-
if ( ! $term || ! $term instanceof \WP_Term ) {
359+
if ( ! $term ) {
360360
return;
361361
}
362362

classes/suggested-tasks/data-collector/class-hello-world.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,6 @@ protected function calculate_data() {
7070
$sample_post = ! empty( $query->post ) ? $query->post : 0;
7171
}
7272

73-
return ( \is_object( $sample_post ) && \is_a( $sample_post, \WP_Post::class ) ) ? $sample_post->ID : 0;
73+
return \is_object( $sample_post ) ? $sample_post->ID : 0;
7474
}
7575
}

classes/suggested-tasks/data-collector/class-sample-page.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,6 @@ protected function calculate_data() {
7070
$sample_page = ! empty( $query->post ) ? $query->post : 0;
7171
}
7272

73-
return ( \is_object( $sample_page ) && \is_a( $sample_page, \WP_Post::class ) ) ? $sample_page->ID : 0;
73+
return \is_object( $sample_page ) ? $sample_page->ID : 0;
7474
}
7575
}

0 commit comments

Comments
 (0)