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 ) {