From 6e61ff696429ecd43a28173537c06a74c17d03ad Mon Sep 17 00:00:00 2001 From: Filippo Tessarotto Date: Thu, 8 Aug 2024 12:17:09 +0200 Subject: [PATCH] Add PHP 8.4 compatibility --- src/ExtensionMimeTypeDetector.php | 2 +- src/FinfoMimeTypeDetector.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ExtensionMimeTypeDetector.php b/src/ExtensionMimeTypeDetector.php index cd34462..0caa5fe 100644 --- a/src/ExtensionMimeTypeDetector.php +++ b/src/ExtensionMimeTypeDetector.php @@ -13,7 +13,7 @@ class ExtensionMimeTypeDetector implements MimeTypeDetector, ExtensionLookup */ private $extensions; - public function __construct(ExtensionToMimeTypeMap $extensions = null) + public function __construct(?ExtensionToMimeTypeMap $extensions = null) { $this->extensions = $extensions ?: new GeneratedExtensionToMimeTypeMap(); } diff --git a/src/FinfoMimeTypeDetector.php b/src/FinfoMimeTypeDetector.php index 8084f92..2ccf328 100644 --- a/src/FinfoMimeTypeDetector.php +++ b/src/FinfoMimeTypeDetector.php @@ -41,7 +41,7 @@ class FinfoMimeTypeDetector implements MimeTypeDetector, ExtensionLookup public function __construct( string $magicFile = '', - ExtensionToMimeTypeMap $extensionMap = null, + ?ExtensionToMimeTypeMap $extensionMap = null, ?int $bufferSampleSize = null, array $inconclusiveMimetypes = self::INCONCLUSIVE_MIME_TYPES ) {