[CORE][GSFile] Add type annotation to the $encoders used in attachment handling

This commit is contained in:
Hugo Sales 2021-09-23 14:52:33 +01:00
parent bb81f1f717
commit af3531f1c7
Signed by untrusted user: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0

View File

@ -81,6 +81,7 @@ class GSFile
Event::handle('FileMetaAvailable', [&$event_map, $mimetype]);
}
// Always prefer specific encoders
/** @var array<callable(TemporaryFile|SymfonyFile &$file, string &$mimetype, int &$width, int &$height): bool> $encoders */
$encoders = array_merge($event_map[$mimetype], $event_map[$major_mime]);
foreach ($encoders as $encoder) {
// These are all I/O params