diff --git a/src/alley/wp/alleyvate/features/class-disable-attachment-routing.php b/src/alley/wp/alleyvate/features/class-disable-attachment-routing.php index 05d64a76..53edb3e6 100644 --- a/src/alley/wp/alleyvate/features/class-disable-attachment-routing.php +++ b/src/alley/wp/alleyvate/features/class-disable-attachment-routing.php @@ -79,7 +79,7 @@ public static function action__pre_get_posts( $query ) { * * @param \WP_Admin_Bar $wp_admin_bar Admin bar class. */ - public static function action__admin_bar_menu( \WP_Admin_Bar $wp_admin_bar ) { + public static function action__admin_bar_menu( $wp_admin_bar ): void { if ( 'attachment' === get_post_type() ) { $wp_admin_bar->remove_node( 'view' ); } diff --git a/tests/alley/wp/alleyvate/features/test-disable-attachment-routing.php b/tests/alley/wp/alleyvate/features/test-disable-attachment-routing.php index 384a5c4e..eafce7fc 100644 --- a/tests/alley/wp/alleyvate/features/test-disable-attachment-routing.php +++ b/tests/alley/wp/alleyvate/features/test-disable-attachment-routing.php @@ -42,7 +42,7 @@ protected function setUp(): void { * Test that the attachment permalink is empty. */ public function test_attachment_permalink(): void { - $attachment_id = $this->factory()->attachment->create(); + $attachment_id = self::factory()->attachment->create(); $this->assertNotEmpty( get_permalink( $attachment_id ) ); @@ -55,7 +55,7 @@ public function test_attachment_permalink(): void { * Test that the attachment page returns a 404. */ public function test_attachment_page(): void { - $attachment_id = $this->factory()->attachment->create(); + $attachment_id = self::factory()->attachment->create(); $permalink = get_permalink( $attachment_id ); $this