From 839bc6a3c671ab30de3e5c258afa0775975de976 Mon Sep 17 00:00:00 2001 From: Oliver Vogel Date: Mon, 5 Aug 2024 16:38:16 +0200 Subject: [PATCH] Refactor code --- src/Drivers/Gd/Cloner.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Drivers/Gd/Cloner.php b/src/Drivers/Gd/Cloner.php index 3813a1be..8edc2023 100644 --- a/src/Drivers/Gd/Cloner.php +++ b/src/Drivers/Gd/Cloner.php @@ -50,10 +50,7 @@ class Cloner ColorInterface $background = new Color(255, 255, 255, 0) ): GdImage { // define size - $size = match (true) { - is_null($size) => new Rectangle(imagesx($gd), imagesy($gd)), - default => $size, - }; + $size = $size ? $size : new Rectangle(imagesx($gd), imagesy($gd)); // create new gd image with same size or new given size $clone = imagecreatetruecolor($size->width(), $size->height());