Skip to content

Commit

Permalink
chore: remove unnecessary method
Browse files Browse the repository at this point in the history
Signed-off-by: Elizabeth Danzberger <[email protected]>
  • Loading branch information
elzody committed Jan 16, 2025
1 parent f9adb00 commit 1497639
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions lib/private/Files/Conversion/ConversionManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

use OC\AppFramework\Bootstrap\Coordinator;
use OC\SystemConfig;
use OCP\Files\Conversion\ConversionMimeProvider;
use OCP\Files\Conversion\IConversionManager;
use OCP\Files\Conversion\IConversionProvider;
use OCP\Files\File;
Expand Down Expand Up @@ -61,22 +60,6 @@ public function getProviders(): array {
return $providers;
}

/**
* @param string $mime
* @return list<ConversionMimeProvider>
*/
private function getProvidersForMime(string $mime): array {
$mimeTypes = $this->getProviders();
$filtered = array_filter(
$mimeTypes,
function (ConversionMimeProvider $mimeProvider) use ($mime) {
return $mimeProvider->getFrom() === $mime;
}
);

return array_values($filtered);
}

public function convert(File $file, string $targetMimeType, ?string $destination = null): string {
if (!$this->hasProviders()) {
throw new PreConditionNotMetException('No file conversion providers available');
Expand Down

0 comments on commit 1497639

Please sign in to comment.