From be5e7edc6fc6004acbbe29d4dc92ab41513b0895 Mon Sep 17 00:00:00 2001 From: Nicolas Rosset Date: Wed, 29 May 2024 14:03:19 +0000 Subject: [PATCH] Make width or height null by default --- src/Builder.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Builder.php b/src/Builder.php index 1c8cf80..93bb17c 100644 --- a/src/Builder.php +++ b/src/Builder.php @@ -33,14 +33,14 @@ public function withHttpsPrefix(): self * generate an image url from its slug * * @param string $imageSlug the image slug (ie. `/2018/01/foo.jpg`) - * @param int $width the output width - * @param int $height the output height + * @param ?int $width the output width + * @param ?int $height the output height * @param array $options accept cropWidth, cropHeight or url options parameters (like `rcr`, etc.) */ public function buildUrl( string $imageSlug, - int $width = 0, - int $height = 0, + ?int $width = null, + ?int $height = null, array $options = [] ): string { $image = trim($imageSlug);