Skip to content

Commit 15fd0ea

Browse files
committed
Address minor static analysis nits
1 parent 7e6e70c commit 15fd0ea

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

plugins/webp-uploads/hooks.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ function webp_uploads_remove_sources_files( int $attachment_id ): void {
537537
}
538538
}
539539
}
540-
add_action( 'delete_attachment', 'webp_uploads_remove_sources_files', 10, 1 );
540+
add_action( 'delete_attachment', 'webp_uploads_remove_sources_files' );
541541

542542
/**
543543
* Filters `wp_content_img_tag` to update images so that they use the preferred MIME type where possible.
@@ -662,7 +662,7 @@ function webp_uploads_img_tag_update_mime_type( string $original_image, string $
662662
}
663663

664664
/**
665-
* Updates the references of the featured image to the a new image format if available, in the same way it
665+
* Updates the references of the featured image to the new image format if available, in the same way it
666666
* occurs in the_content of a post.
667667
*
668668
* @since 1.0.0

plugins/webp-uploads/tests/test-load.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ public function test_it_should_allow_the_upload_of_a_webp_image_if_at_least_one_
720720
static function ( $editors ) {
721721
// WP core does not choose the WP_Image_Editor instance based on MIME type support,
722722
// therefore the one that does support modern images needs to be first in this list.
723-
array_unshift( $editors, 'WP_Image_Doesnt_Support_Modern_Images' );
723+
array_unshift( $editors, WP_Image_Doesnt_Support_Modern_Images::class );
724724
return $editors;
725725
}
726726
);
@@ -1143,7 +1143,7 @@ public function test_webp_uploads_convert_palette_png_to_truecolor( ?string $ima
11431143
add_filter(
11441144
'wp_image_editors',
11451145
static function () {
1146-
return array( 'WP_Image_Editor_GD' );
1146+
return array( WP_Image_Editor_GD::class );
11471147
}
11481148
);
11491149

@@ -1168,7 +1168,7 @@ static function () {
11681168
try {
11691169
$this->assertIsNumeric( $attachment_id );
11701170

1171-
// For getting a original image path for computation of the file hash.
1171+
// For getting an original image path for computation of the file hash.
11721172
$meta = wp_get_attachment_metadata( $attachment_id );
11731173
$upload_dir = wp_get_upload_dir();
11741174
$path = null;

0 commit comments

Comments
 (0)