mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-19 19:52:49 +00:00
DX: fix phpstan errors
This commit is contained in:
@@ -69,7 +69,6 @@ class Convert
|
||||
|
||||
$content = $this->storedObjectManager->read($storedObject);
|
||||
|
||||
try {
|
||||
$url = sprintf('%s/cool/convert-to/pdf', $this->collaboraDomain);
|
||||
$form = new FormDataPart([
|
||||
'data' => new DataPart($content, $storedObject->getUuid()->toString(), $storedObject->getType()),
|
||||
@@ -80,16 +79,11 @@ class Convert
|
||||
'timeout' => 10,
|
||||
]);
|
||||
|
||||
try {
|
||||
return new Response($response->getContent(), Response::HTTP_OK, [
|
||||
'Content-Type' => 'application/pdf',
|
||||
]);
|
||||
} catch (ClientExceptionInterface $exception) {
|
||||
return $this->onConversionFailed($url, $response);
|
||||
} catch (RedirectionExceptionInterface $e) {
|
||||
return $this->onConversionFailed($url, $response);
|
||||
} catch (ServerExceptionInterface $e) {
|
||||
return $this->onConversionFailed($url, $response);
|
||||
} catch (TransportExceptionInterface $e) {
|
||||
} catch (ClientExceptionInterface|TransportExceptionInterface|RedirectionExceptionInterface|ServerExceptionInterface $exception) {
|
||||
return $this->onConversionFailed($url, $response);
|
||||
}
|
||||
}
|
||||
|
@@ -32,7 +32,7 @@ class UserManager implements \ChampsLibres\WopiBundle\Contracts\UserManagerInter
|
||||
return null;
|
||||
}
|
||||
|
||||
return (string) $user->getLabel();
|
||||
return $user->getLabel();
|
||||
}
|
||||
|
||||
public function getUserId(string $accessToken, string $fileId, RequestInterface $request): ?string
|
||||
|
Reference in New Issue
Block a user