diff --git a/src/Drivers/Abstract/AbstractImage.php b/src/Drivers/Abstract/AbstractImage.php index 7bf79761..530e5291 100644 --- a/src/Drivers/Abstract/AbstractImage.php +++ b/src/Drivers/Abstract/AbstractImage.php @@ -6,6 +6,7 @@ use Intervention\Image\Collection; use Intervention\Image\EncodedImage; use Intervention\Image\Geometry\Point; use Intervention\Image\Geometry\Size; +use Intervention\Image\Interfaces\CollectionInterface; use Intervention\Image\Interfaces\EncoderInterface; use Intervention\Image\Interfaces\FrameInterface; use Intervention\Image\Interfaces\ImageInterface; @@ -24,12 +25,12 @@ abstract class AbstractImage implements ImageInterface // } - public function getIterator(): Collection + public function getIterator(): CollectionInterface { return $this->frames; } - public function getFrames(): Collection + public function getFrames(): CollectionInterface { return $this->frames; } @@ -225,7 +226,7 @@ abstract class AbstractImage implements ImageInterface ); } - public function pickColors(int $x, int $y): Collection + public function pickColors(int $x, int $y): CollectionInterface { $colors = new Collection(); foreach ($this->getFrames() as $key => $frame) { diff --git a/src/Interfaces/ImageInterface.php b/src/Interfaces/ImageInterface.php index 182a76dc..5f16c4d7 100644 --- a/src/Interfaces/ImageInterface.php +++ b/src/Interfaces/ImageInterface.php @@ -2,13 +2,12 @@ namespace Intervention\Image\Interfaces; -use Intervention\Image\Collection; use Intervention\Image\EncodedImage; interface ImageInterface { - public function getIterator(): Collection; - public function getFrames(): Collection; + public function getIterator(): CollectionInterface; + public function getFrames(): CollectionInterface; public function getFrame(int $key = 0): ?FrameInterface; public function addFrame(FrameInterface $frame): ImageInterface; public function setLoops(int $count): ImageInterface; @@ -21,7 +20,7 @@ interface ImageInterface public function toWebp(int $quality = 75): EncodedImage; public function toGif(): EncodedImage; public function toPng(): EncodedImage; - public function pickColors(int $x, int $y): Collection; + public function pickColors(int $x, int $y): CollectionInterface; public function pickColor(int $x, int $y, int $frame_key = 0): ?ColorInterface; public function greyscale(): ImageInterface; public function blur(int $amount = 5): ImageInterface;