From 8e4521a5fe482ad1a6efbb83675e88fbd7c6b563 Mon Sep 17 00:00:00 2001 From: EdgarsN Date: Mon, 29 Jan 2024 21:19:49 +0200 Subject: [PATCH] Fix ImageInterface encode() method argument (#1286) * fix image interface encode argument * import auto encoder --- src/Interfaces/ImageInterface.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Interfaces/ImageInterface.php b/src/Interfaces/ImageInterface.php index 41633a5e..f43baceb 100644 --- a/src/Interfaces/ImageInterface.php +++ b/src/Interfaces/ImageInterface.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace Intervention\Image\Interfaces; use Countable; +use Intervention\Image\Encoders\AutoEncoder; use Intervention\Image\Origin; use IteratorAggregate; @@ -66,7 +67,7 @@ interface ImageInterface extends IteratorAggregate, Countable * @param EncoderInterface $encoder * @return EncodedImageInterface */ - public function encode(EncoderInterface $encoder): EncodedImageInterface; + public function encode(EncoderInterface $encoder = new AutoEncoder()): EncodedImageInterface; /** * Save the image to the specified path in the file system. If no path is