From e1423322494d5f5f00fa518756a87b6e7b19bd19 Mon Sep 17 00:00:00 2001 From: timvandijck Date: Fri, 17 May 2024 15:18:24 +0000 Subject: [PATCH] Fix styling --- src/Drivers/Gd/GdDriver.php | 3 +-- src/Drivers/ImageDriver.php | 4 ++-- src/Drivers/Imagick/ImagickDriver.php | 9 ++++----- src/Image.php | 3 +-- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/Drivers/Gd/GdDriver.php b/src/Drivers/Gd/GdDriver.php index 0ba18dd3..ccda18d4 100644 --- a/src/Drivers/Gd/GdDriver.php +++ b/src/Drivers/Gd/GdDriver.php @@ -231,8 +231,7 @@ public function fit( ?int $desiredHeight = null, bool $relative = false, string $backgroundColor = '#ffffff' - ): static - { + ): static { if ($fit === Fit::Crop) { return $this->fitCrop($fit, $this->getWidth(), $this->getHeight(), $desiredWidth, $desiredHeight); } diff --git a/src/Drivers/ImageDriver.php b/src/Drivers/ImageDriver.php index 956234b4..3cd258b1 100644 --- a/src/Drivers/ImageDriver.php +++ b/src/Drivers/ImageDriver.php @@ -53,8 +53,8 @@ public function sharpen(float $amount): static; public function getSize(): Size; public function fit( - Fit $fit, - ?int $desiredWidth = null, + Fit $fit, + ?int $desiredWidth = null, ?int $desiredHeight = null, bool $relative = false, string $backgroundColor = '#ffffff' diff --git a/src/Drivers/Imagick/ImagickDriver.php b/src/Drivers/Imagick/ImagickDriver.php index dc6c5def..92279dbd 100644 --- a/src/Drivers/Imagick/ImagickDriver.php +++ b/src/Drivers/Imagick/ImagickDriver.php @@ -121,13 +121,12 @@ public function blur(int $blur): static } public function fit( - Fit $fit, - ?int $desiredWidth = null, + Fit $fit, + ?int $desiredWidth = null, ?int $desiredHeight = null, bool $relative = false, - string $backgroundColor = null, - ): static - { + ?string $backgroundColor = null, + ): static { if ($fit === Fit::Crop) { return $this->fitCrop($fit, $this->getWidth(), $this->getHeight(), $desiredWidth, $desiredHeight); } diff --git a/src/Image.php b/src/Image.php index c9589d39..58cd377c 100644 --- a/src/Image.php +++ b/src/Image.php @@ -179,8 +179,7 @@ public function fit( ?int $desiredHeight = null, bool $relative = false, string $backgroundColor = '#ffffff' - ): static - { + ): static { $this->imageDriver->fit($fit, $desiredWidth, $desiredHeight, $relative, $backgroundColor); return $this;