Skip to content

Commit

Permalink
feat: Use L10N factory and set app
Browse files Browse the repository at this point in the history
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
  • Loading branch information
elzody committed Jan 17, 2025
1 parent 19c77a2 commit bff8174
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/Conversion/ConversionProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@
use OCP\Files\Conversion\IConversionProvider;
use OCP\Files\File;
use OCP\IL10N;
use OCP\L10N\IFactory;
use Psr\Log\LoggerInterface;

class ConversionProvider implements IConversionProvider {

Check failure on line 20 in lib/Conversion/ConversionProvider.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis

UndefinedClass

lib/Conversion/ConversionProvider.php:20:37: UndefinedClass: Class, interface or enum named OCP\Files\Conversion\IConversionProvider does not exist (see https://psalm.dev/019)
private IL10N $l10n;

private const MIME_TYPES = [
'documents' => [
'application/msword',
Expand Down Expand Up @@ -49,8 +52,9 @@ class ConversionProvider implements IConversionProvider {
public function __construct(
private RemoteService $remoteService,
private LoggerInterface $logger,
private IL10N $l10n,
IFactory $l10nFactory,
) {
$this->l10n = $l10nFactory->get('richdocuments');
}

public function getSupportedMimeTypes(): array {
Expand Down

0 comments on commit bff8174

Please sign in to comment.