Docs: Replace multiple single line comments with multi-line comments.

This changeset updates various comments as per WordPress PHP Inline Documentation Standards.
See https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/#5-inline-comments.

Follow-up to [56174], [56175], [56176], [56177].

Props costdev, audrasjb.
See #58459.




git-svn-id: https://develop.svn.wordpress.org/trunk@56178 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jb Audras
2023-07-09 21:23:34 +00:00
parent 3b68269941
commit bf911a96a8
8 changed files with 73 additions and 38 deletions

View File

@@ -349,8 +349,10 @@ abstract class WP_Image_Editor {
$file_mime = $this->mime_type;
}
// Check to see if specified mime-type is the same as type implied by
// file extension. If so, prefer extension from file.
/*
* Check to see if specified mime-type is the same as type implied by
* file extension. If so, prefer extension from file.
*/
if ( ! $mime_type || ( $file_mime == $mime_type ) ) {
$mime_type = $file_mime;
$new_ext = $file_ext;
@@ -384,8 +386,10 @@ abstract class WP_Image_Editor {
$new_ext = $this->get_extension( $mime_type );
}
// Double-check that the mime-type selected is supported by the editor.
// If not, choose a default instead.
/*
* Double-check that the mime-type selected is supported by the editor.
* If not, choose a default instead.
*/
if ( ! $this->supports_mime_type( $mime_type ) ) {
/**
* Filters default mime type prior to getting the file extension.
@@ -400,9 +404,11 @@ abstract class WP_Image_Editor {
$new_ext = $this->get_extension( $mime_type );
}
// Ensure both $filename and $new_ext are not empty.
// $this->get_extension() returns false on error which would effectively remove the extension
// from $filename. That shouldn't happen, files without extensions are not supported.
/*
* Ensure both $filename and $new_ext are not empty.
* $this->get_extension() returns false on error which would effectively remove the extension
* from $filename. That shouldn't happen, files without extensions are not supported.
*/
if ( $filename && $new_ext ) {
$dir = pathinfo( $filename, PATHINFO_DIRNAME );
$ext = pathinfo( $filename, PATHINFO_EXTENSION );
@@ -515,8 +521,10 @@ abstract class WP_Image_Editor {
$result = $this->flip( false, true );
break;
case 3:
// Rotate 180 degrees or flip horizontally and vertically.
// Flipping seems faster and uses less resources.
/*
* Rotate 180 degrees or flip horizontally and vertically.
* Flipping seems faster and uses less resources.
*/
$result = $this->flip( true, true );
break;
case 4: