Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Renato Alves <[email protected]>
  • Loading branch information
srtfisher and renatonascalves authored Jan 10, 2024
1 parent bae4d29 commit a30c570
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) );

Expand All @@ -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
Expand Down

0 comments on commit a30c570

Please sign in to comment.