From 0b2b1ad34b555fcd063ff4007ac02cff796ecd6f Mon Sep 17 00:00:00 2001 From: Rob Gridley Date: Thu, 18 May 2023 09:34:36 -0400 Subject: [PATCH] Clean up constructor --- src/SmbAdapter.php | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/SmbAdapter.php b/src/SmbAdapter.php index 7f8bcf7..bf06ab2 100644 --- a/src/SmbAdapter.php +++ b/src/SmbAdapter.php @@ -35,24 +35,16 @@ class SmbAdapter implements FilesystemAdapter */ private PathPrefixer $prefixer; - /** - * The mime type detector instance. - * - * @var MimeTypeDetector - */ - private MimeTypeDetector $mimeTypeDetector; - /** * Create an SMB adapter instance. * * @param IShare $share * @param string $root - * @param MimeTypeDetector|null $mimeTypeDetector + * @param MimeTypeDetector $mimeTypeDetector */ - function __construct(private IShare $share, string $root = '', MimeTypeDetector $mimeTypeDetector = null) + function __construct(private IShare $share, string $root = '', private MimeTypeDetector $mimeTypeDetector = new FinfoMimeTypeDetector()) { $this->prefixer = new PathPrefixer($root); - $this->mimeTypeDetector = $mimeTypeDetector ?: new FinfoMimeTypeDetector(); } /**