1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-10 07:53:58 +02:00

Fix deprecation warnings for PHP 8.1

This commit is contained in:
Oliver Vogel
2023-09-29 15:46:55 +02:00
parent 32fd9481cc
commit 4f51d8f098
3 changed files with 3 additions and 4 deletions

View File

@@ -56,7 +56,7 @@ abstract class AbstractFont implements FontInterface
public function hasFilename(): bool public function hasFilename(): bool
{ {
return is_file($this->filename); return !is_null($this->filename) && is_file($this->filename);
} }
public function color($color): FontInterface public function color($color): FontInterface

View File

@@ -22,7 +22,6 @@ class DrawPolygonModifier extends AbstractDrawModifier implements ModifierInterf
imagefilledpolygon( imagefilledpolygon(
$frame->getCore(), $frame->getCore(),
$this->polygon()->toArray(), $this->polygon()->toArray(),
$this->polygon()->count(),
$this->getBackgroundColor()->toInt() $this->getBackgroundColor()->toInt()
); );
} }

View File

@@ -77,14 +77,14 @@ class Image extends AbstractImage implements ImageInterface, Iterator
return $this->imagick->getNumberImages(); return $this->imagick->getNumberImages();
} }
public function current() public function current(): mixed
{ {
$this->imagick->setIteratorIndex($this->iteratorIndex); $this->imagick->setIteratorIndex($this->iteratorIndex);
return new Frame($this->imagick->current()); return new Frame($this->imagick->current());
} }
public function key() public function key(): mixed
{ {
return $this->iteratorIndex; return $this->iteratorIndex;
} }