From c65ad77be3ee31ce6770dc8580faa7ad3a228cec Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Wed, 29 Mar 2023 16:19:31 -0700 Subject: [PATCH] lint: fix php Signed-off-by: Varun Patil --- lib/Controller/ImageController.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/Controller/ImageController.php b/lib/Controller/ImageController.php index 9f6faff7..0264d52b 100644 --- a/lib/Controller/ImageController.php +++ b/lib/Controller/ImageController.php @@ -274,16 +274,17 @@ class ImageController extends GenericApiController /** * Given a blob of image data, return a JPEG blob. * - * @param string $blob Blob of image data in any format + * @param string $blob Blob of image data in any format * @param string $mimetype Mimetype of image data * * @return array [blob, mimetype] */ - private function getImageJPEG($blob, $mimetype): array { + private function getImageJPEG($blob, $mimetype): array + { // TODO: Use imaginary if available // Check if Imagick is available - if (!\class_exists('Imagick')) { + if (!class_exists('Imagick')) { throw Exceptions::Forbidden('Imagick extension is not available'); } @@ -292,7 +293,7 @@ class ImageController extends GenericApiController $image = new \Imagick(); $image->readImageBlob($blob); } catch (\ImagickException $e) { - throw Exceptions::Forbidden('Imagick failed to read image: '. $e->getMessage()); + throw Exceptions::Forbidden('Imagick failed to read image: '.$e->getMessage()); } // Convert to JPEG @@ -303,7 +304,7 @@ class ImageController extends GenericApiController $blob = $image->getImageBlob(); $mimetype = $image->getImageMimeType(); } catch (\ImagickException $e) { - throw Exceptions::Forbidden('Imagick failed to convert image: '. $e->getMessage()); + throw Exceptions::Forbidden('Imagick failed to convert image: '.$e->getMessage()); } return [$blob, $mimetype];