4
0
Derivar 1

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

remotes/upstream/experimental
Hugo Sales 2021-09-23 14:52:33 +01:00
ascendente bb81f1f717
cometimento af3531f1c7
Assinados por: someonewithpc
ID da chave GPG: 7D0C7EAFC9D835A0
1 ficheiros modificados com 1 adições e 0 eliminações

Ver ficheiro

@ -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