diff --git a/src/Drivers/Abstract/AbstractFont.php b/src/Drivers/Abstract/AbstractFont.php index 4649cc9c..9c8784ce 100644 --- a/src/Drivers/Abstract/AbstractFont.php +++ b/src/Drivers/Abstract/AbstractFont.php @@ -56,7 +56,7 @@ abstract class AbstractFont implements FontInterface public function hasFilename(): bool { - return is_file($this->filename); + return !is_null($this->filename) && is_file($this->filename); } public function color($color): FontInterface diff --git a/src/Drivers/Gd/Modifiers/DrawPolygonModifier.php b/src/Drivers/Gd/Modifiers/DrawPolygonModifier.php index 29dcf95e..cb4c930f 100644 --- a/src/Drivers/Gd/Modifiers/DrawPolygonModifier.php +++ b/src/Drivers/Gd/Modifiers/DrawPolygonModifier.php @@ -22,7 +22,6 @@ class DrawPolygonModifier extends AbstractDrawModifier implements ModifierInterf imagefilledpolygon( $frame->getCore(), $this->polygon()->toArray(), - $this->polygon()->count(), $this->getBackgroundColor()->toInt() ); } diff --git a/src/Drivers/Imagick/Image.php b/src/Drivers/Imagick/Image.php index 906322af..e7b2a9ab 100644 --- a/src/Drivers/Imagick/Image.php +++ b/src/Drivers/Imagick/Image.php @@ -77,14 +77,14 @@ class Image extends AbstractImage implements ImageInterface, Iterator return $this->imagick->getNumberImages(); } - public function current() + public function current(): mixed { $this->imagick->setIteratorIndex($this->iteratorIndex); return new Frame($this->imagick->current()); } - public function key() + public function key(): mixed { return $this->iteratorIndex; }