Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/private/Files/Type/Detection.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Detection implements IMimeTypeDetector {
private const CUSTOM_MIMETYPEMAPPING = 'mimetypemapping.json';
private const CUSTOM_MIMETYPEALIASES = 'mimetypealiases.json';

/** @var array<string, list{string, string|null}> */
/** @var array<list{string, string|null}> */
protected array $mimetypes = [];
protected array $secureMimeTypes = [];

Expand Down Expand Up @@ -140,7 +140,7 @@ private function loadMappings(): void {
}

/**
* @return array<string, list{string, string|null}>
* @return array<list{string, string|null}>
*/
public function getAllMappings(): array {
$this->loadMappings();
Expand Down
10 changes: 9 additions & 1 deletion lib/public/Files/IMimeTypeDetector.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,15 @@ public function mimeTypeIcon($mimeType);
public function getAllAliases(): array;

/**
* @return array<string, list{string, string|null}>
* Get all extension to MIME type mappings.
*
* The return format is an array of the file extension, as the key,
* mapped to a list where the first entry is the MIME type
* and the second entry is the secure MIME type (or null if none).
* Due to PHP idiosyncrasies if a numeric string is set as the extension,
* then also the array key (file extension) is a number instead of a string.
*
* @return array<list{string, string|null}>
* @since 32.0.0
*/
public function getAllMappings(): array;
Expand Down
Loading