mirror of
https://github.com/Intervention/image.git
synced 2025-01-17 12:18:14 +01:00
Fix deprecation warnings for PHP 8.1
This commit is contained in:
parent
32fd9481cc
commit
4f51d8f098
@ -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
|
||||
|
@ -22,7 +22,6 @@ class DrawPolygonModifier extends AbstractDrawModifier implements ModifierInterf
|
||||
imagefilledpolygon(
|
||||
$frame->getCore(),
|
||||
$this->polygon()->toArray(),
|
||||
$this->polygon()->count(),
|
||||
$this->getBackgroundColor()->toInt()
|
||||
);
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user