From 12c5b1e6f3addb41fd8a13d1feb7828055558362 Mon Sep 17 00:00:00 2001 From: Natan Felles Date: Fri, 23 Aug 2024 20:53:29 -0300 Subject: [PATCH] Upgrade coding standard --- composer.json | 2 +- src/Image.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 8d37144..6d10717 100644 --- a/composer.json +++ b/composer.json @@ -39,7 +39,7 @@ }, "require-dev": { "ext-xdebug": "*", - "aplus/coding-standard": "^2.4", + "aplus/coding-standard": "^2.8", "ergebnis/composer-normalize": "^2.15", "jetbrains/phpstorm-attributes": "^1.0", "phpmd/phpmd": "^2.13", diff --git a/src/Image.php b/src/Image.php index f7b346b..cf62477 100644 --- a/src/Image.php +++ b/src/Image.php @@ -254,7 +254,7 @@ public function getWidth() : int * given image type or false on fail */ #[Pure] - public function getExtension() : string | false + public function getExtension() : false | string { return \image_type_to_extension($this->type); } @@ -277,7 +277,7 @@ public function getMime() : string * * @return bool */ - public function save(string $filename = null) : bool + public function save(?string $filename = null) : bool { $filename ??= $this->filename; return match ($this->type) {