We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af53eaf commit 76f6b7bCopy full SHA for 76f6b7b
src/Files/ValueObjects/MimeType.php
@@ -108,7 +108,7 @@ public function __construct(string $value)
108
);
109
}
110
111
- $this->value = $value;
+ $this->value = strtolower($value);
112
113
114
/**
@@ -236,7 +236,13 @@ public function equals($other): bool
236
return $this->value === $other->value;
237
238
239
- return $this->value === $other;
+ if (is_string($other)) {
240
+ return $this->value === strtolower($other);
241
+ }
242
+
243
+ throw new \InvalidArgumentException(
244
+ sprintf('Invalid MIME type comparison: %s', gettype($other))
245
+ );
246
247
248
0 commit comments