#55154 closed defect (bug) (fixed)
Typo in a comment in wp_get_image_mime()
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.0 | Priority: | normal |
Severity: | trivial | Version: | |
Component: | Media | Keywords: | good-first-bug has-patch |
Focuses: | docs | Cc: |
Description
There is a comment block in wp_get_image_mime()
:
/* * Use exif_imagetype() to check the mimetype if available or fall back to * getimagesize() if exif isn't avaialbe. If either function throws an Exception * we assume the file could not be validated. */
"avaialbe" here should be "available".
Attachments (1)
Change History (5)
#2
follow-up:
↓ 3
@
16 months ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
#3
in reply to:
↑ 2
;
follow-up:
↓ 4
@
16 months ago
Replying to SergeyBiryukov:
In 52719:
Hi I think the first word in the comment should be "uses" as it referred to the third person of singular what replace "the block".
So it should be
<?php /* * (it) Uses exif_imagetype() to check... */
Without the "it". "It" referred to the block.
RE: https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/#language
#4
in reply to:
↑ 3
@
16 months ago
Replying to azouamauriac:
Hi I think the first word in the comment should be "uses" as it referred to the third person of singular what replace "the block".
Thanks for the note! That recommendation from the documentation standards refers to function DocBlocks, however this is just an inline comment and not a DocBlock, so it looks fine to me as is. It describes the next few lines of the code, and not what the function does in general. The function DocBlock does use a third-person singular verb:
Returns the real mime type of an image file.
In 52719: