From cd2f72f011d8bee8637591d367fdaa22f125bc87 Mon Sep 17 00:00:00 2001 From: Oliver Vogel Date: Sat, 25 Nov 2023 14:47:35 +0100 Subject: [PATCH] Fix bugs --- src/Drivers/AbstractDecoder.php | 2 +- src/Drivers/Gd/Core.php | 4 +++- src/Typography/Line.php | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Drivers/AbstractDecoder.php b/src/Drivers/AbstractDecoder.php index 569467b5..20657291 100644 --- a/src/Drivers/AbstractDecoder.php +++ b/src/Drivers/AbstractDecoder.php @@ -58,7 +58,7 @@ abstract class AbstractDecoder implements DecoderInterface protected function decodeExifData(string $image_data): CollectionInterface { if (!function_exists('exif_read_data')) { - return []; + return new Collection(); } try { diff --git a/src/Drivers/Gd/Core.php b/src/Drivers/Gd/Core.php index c289af7d..210d9ec7 100644 --- a/src/Drivers/Gd/Core.php +++ b/src/Drivers/Gd/Core.php @@ -17,7 +17,9 @@ class Core extends Collection implements CoreInterface public function setNative(mixed $native): self { - return $this->empty()->push(new Frame($native)); + $this->empty()->push(new Frame($native)); + + return $this; } public function frame(int $position): FrameInterface diff --git a/src/Typography/Line.php b/src/Typography/Line.php index 87223a1f..88d84c58 100644 --- a/src/Typography/Line.php +++ b/src/Typography/Line.php @@ -13,7 +13,7 @@ class Line ) { } - public function position(): Point + public function position(): PointInterface { return $this->position; }