Skip to content

Commit fdd1495

Browse files
committed
Clarify isType method PHPDoc in MimeType class
Updated the PHPDoc for the isType method to clarify that it checks if the stored MIME type begins with the given prefix, improving documentation accuracy and developer understanding.
1 parent 3697b1f commit fdd1495

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/Files/ValueObjects/MimeType.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,14 +170,15 @@ public static function isValid(string $mimeType): bool
170170
}
171171

172172
/**
173-
* Checks if this MIME type has a specific MIME type.
173+
* Checks if this MIME type is a specific type.
174174
*
175-
* This method checks if the MIME type starts with the specified MIME type.
175+
* This method returns true when the stored MIME type begins with the
176+
* given prefix. For example, `"audio"` matches `"audio/mpeg"`.
176177
*
177178
* @since n.e.x.t
178179
*
179-
* @param string $mimeType The MIME type to check.
180-
* @return bool True if the MIME type has the specified MIME type.
180+
* @param string $mimeType The MIME type prefix to check (e.g., "audio", "image").
181+
* @return bool True if this MIME type is of the specified type.
181182
*/
182183
public function isType(string $mimeType): bool
183184
{

0 commit comments

Comments
 (0)