aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php2
-rw-r--r--lib/private/Files/Type/Detection.php41
-rw-r--r--lib/public/Files/IMimeTypeDetector.php2
3 files changed, 16 insertions, 29 deletions
diff --git a/core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php b/core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php
index 873744e6f94..611b880cefd 100644
--- a/core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php
+++ b/core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php
@@ -31,7 +31,7 @@ class GenerateMimetypeFileBuilder {
/**
* Generate mime type list file
*
- * @param array $aliases
+ * @param array<string,string> $aliases
* @return string
*/
public function generateFile(array $aliases): string {
diff --git a/lib/private/Files/Type/Detection.php b/lib/private/Files/Type/Detection.php
index 71b8cb986d7..a6944995f4c 100644
--- a/lib/private/Files/Type/Detection.php
+++ b/lib/private/Files/Type/Detection.php
@@ -56,32 +56,19 @@ class Detection implements IMimeTypeDetector {
private const CUSTOM_MIMETYPEMAPPING = 'mimetypemapping.json';
private const CUSTOM_MIMETYPEALIASES = 'mimetypealiases.json';
- protected $mimetypes = [];
- protected $secureMimeTypes = [];
-
- protected $mimetypeIcons = [];
- /** @var string[] */
- protected $mimeTypeAlias = [];
-
- /** @var IURLGenerator */
- private $urlGenerator;
-
- private LoggerInterface $logger;
-
- /** @var string */
- private $customConfigDir;
-
- /** @var string */
- private $defaultConfigDir;
-
- public function __construct(IURLGenerator $urlGenerator,
- LoggerInterface $logger,
- string $customConfigDir,
- string $defaultConfigDir) {
- $this->urlGenerator = $urlGenerator;
- $this->logger = $logger;
- $this->customConfigDir = $customConfigDir;
- $this->defaultConfigDir = $defaultConfigDir;
+ protected array $mimetypes = [];
+ protected array $secureMimeTypes = [];
+
+ protected array $mimetypeIcons = [];
+ /** @var array<string,string> */
+ protected array $mimeTypeAlias = [];
+
+ public function __construct(
+ private IURLGenerator $urlGenerator,
+ private LoggerInterface $logger,
+ private string $customConfigDir,
+ private string $defaultConfigDir,
+ ) {
}
/**
@@ -151,7 +138,7 @@ class Detection implements IMimeTypeDetector {
}
/**
- * @return string[]
+ * @return array<string,string>
*/
public function getAllAliases(): array {
$this->loadAliases();
diff --git a/lib/public/Files/IMimeTypeDetector.php b/lib/public/Files/IMimeTypeDetector.php
index 9992c153edc..4933975e108 100644
--- a/lib/public/Files/IMimeTypeDetector.php
+++ b/lib/public/Files/IMimeTypeDetector.php
@@ -84,7 +84,7 @@ interface IMimeTypeDetector {
public function mimeTypeIcon($mimeType);
/**
- * @return string[]
+ * @return array<string,string>
* @since 28.0.0
*/
public function getAllAliases(): array;