diff --git a/src/MediaType.php b/src/MediaType.php index 8ac1a64..5612f48 100644 --- a/src/MediaType.php +++ b/src/MediaType.php @@ -9,7 +9,7 @@ * @see https://mimesniff.spec.whatwg.org/ * @license MIT */ -class MediaType implements Stringable { +final class MediaType implements Stringable { /** * Gives the first portion of a media type's essence. * e.g, if given 'text/plain', it will return 'text'. diff --git a/src/MediaTypeParser.php b/src/MediaTypeParser.php index 0eb3c72..e1597fd 100644 --- a/src/MediaTypeParser.php +++ b/src/MediaTypeParser.php @@ -8,7 +8,7 @@ /** * @see https://mimesniff.spec.whatwg.org/#parsing-a-mime-type */ -class MediaTypeParser { +final class MediaTypeParser { public function parseOrNull( string $s ): MediaType|null { try { return $this->parse( $s ); diff --git a/src/MediaTypeParserException.php b/src/MediaTypeParserException.php index b22c1a3..abb9c81 100644 --- a/src/MediaTypeParserException.php +++ b/src/MediaTypeParserException.php @@ -7,5 +7,5 @@ /** * @license MIT */ -class MediaTypeParserException extends Exception { +final class MediaTypeParserException extends Exception { } diff --git a/src/Utf8Utils.php b/src/Utf8Utils.php index 3874689..c5d5e0b 100644 --- a/src/Utf8Utils.php +++ b/src/Utf8Utils.php @@ -9,7 +9,7 @@ * @internal * @license MIT */ -class Utf8Utils { +final class Utf8Utils { public static function onlyContains( string $input, callable $predicateFn ): bool { if ( $input === '' ) { return true;