File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ class Detection implements IMimeTypeDetector {
2323 private const CUSTOM_MIMETYPEMAPPING = 'mimetypemapping.json ' ;
2424 private const CUSTOM_MIMETYPEALIASES = 'mimetypealiases.json ' ;
2525
26- /** @var array<string, list{string, string|null}> */
26+ /** @var array<list{string, string|null}> */
2727 protected array $ mimetypes = [];
2828 protected array $ secureMimeTypes = [];
2929
@@ -140,7 +140,7 @@ private function loadMappings(): void {
140140 }
141141
142142 /**
143- * @return array<string, list{string, string|null}>
143+ * @return array<list{string, string|null}>
144144 */
145145 public function getAllMappings (): array {
146146 $ this ->loadMappings ();
Original file line number Diff line number Diff line change @@ -75,7 +75,15 @@ public function mimeTypeIcon($mimeType);
7575 public function getAllAliases (): array ;
7676
7777 /**
78- * @return array<string, list{string, string|null}>
78+ * Get all extension to MIME type mappings.
79+ *
80+ * The return format is an array of the file extension, as the key,
81+ * mapped to a list where the first entry is the MIME type
82+ * and the second entry is the secure MIME type (or null if none).
83+ * Due to PHP idiosyncrasies if a numeric string is set as the extension,
84+ * then also the array key (file extension) is a number instead of a string.
85+ *
86+ * @return array<list{string, string|null}>
7987 * @since 32.0.0
8088 */
8189 public function getAllMappings (): array ;
You can’t perform that action at this time.
0 commit comments