Browse Source

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

remotes/upstream/experimental
Hugo Sales 8 months ago
parent
commit
af3531f1c7
Signed by: someonewithpc <hugo@hsal.es> GPG Key ID: 7D0C7EAFC9D835A0
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      src/Core/GSFile.php

+ 1
- 0
src/Core/GSFile.php 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


Loading…
Cancel
Save