Skip to content

Commit 6d2f700

Browse files
committed
Rename isType to isMimeType in File DTO
Refactored the File DTO method isType to isMimeType for clarity. Updated all relevant unit tests to use the new method name.
1 parent 4a606f0 commit 6d2f700

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Files/DTO/File.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ public function isText(): bool
295295
*
296296
* @return bool True if the file is of the specified type.
297297
*/
298-
public function isType(string $type): bool
298+
public function isMimeType(string $type): bool
299299
{
300300
return $this->mimeType->isType($type);
301301
}

tests/unit/Files/DTO/FileTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,10 +207,10 @@ public function testMimeTypeMethods(): void
207207
$this->assertFalse($file->isImage());
208208
$this->assertFalse($file->isAudio());
209209
$this->assertFalse($file->isText());
210-
$this->assertTrue($file->isType('video'));
211-
$this->assertFalse($file->isType('image'));
212-
$this->assertFalse($file->isType('audio'));
213-
$this->assertFalse($file->isType('text'));
210+
$this->assertTrue($file->isMimeType('video'));
211+
$this->assertFalse($file->isMimeType('image'));
212+
$this->assertFalse($file->isMimeType('audio'));
213+
$this->assertFalse($file->isMimeType('text'));
214214
}
215215

216216
/**

0 commit comments

Comments
 (0)