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:
@@ -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
|
||||||
|
@@ -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()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@@ -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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user