diff --git a/src/Drivers/Gd/Encoders/GifEncoder.php b/src/Drivers/Gd/Encoders/GifEncoder.php index b01fdd03..6f258982 100644 --- a/src/Drivers/Gd/Encoders/GifEncoder.php +++ b/src/Drivers/Gd/Encoders/GifEncoder.php @@ -28,7 +28,7 @@ class GifEncoder extends AbstractEncoder implements EncoderInterface $builder = GifBuilder::canvas( $image->width(), $image->height(), - $image->getLoops() + $image->loops() ); foreach ($image as $frame) { diff --git a/src/Drivers/Gd/Image.php b/src/Drivers/Gd/Image.php index 6b24619d..c2887c7c 100644 --- a/src/Drivers/Gd/Image.php +++ b/src/Drivers/Gd/Image.php @@ -40,7 +40,7 @@ class Image extends AbstractImage implements ImageInterface, IteratorAggregate return $this->count() > 1; } - public function getLoops(): int + public function loops(): int { return $this->loops; } diff --git a/src/Drivers/Imagick/Image.php b/src/Drivers/Imagick/Image.php index a83d9a67..74f5ebfd 100644 --- a/src/Drivers/Imagick/Image.php +++ b/src/Drivers/Imagick/Image.php @@ -76,7 +76,7 @@ class Image extends AbstractImage implements ImageInterface, Iterator return $this; } - public function getLoops(): int + public function loops(): int { return $this->imagick->getImageIterations(); } diff --git a/src/Interfaces/ImageInterface.php b/src/Interfaces/ImageInterface.php index b09ef526..a981cfbb 100644 --- a/src/Interfaces/ImageInterface.php +++ b/src/Interfaces/ImageInterface.php @@ -46,7 +46,7 @@ interface ImageInterface extends Traversable, Countable * * @return int */ - public function getLoops(): int; + public function loops(): int; /** * Return size of current image diff --git a/tests/Drivers/Gd/ImageTest.php b/tests/Drivers/Gd/ImageTest.php index 26a7c344..96b2fd6b 100644 --- a/tests/Drivers/Gd/ImageTest.php +++ b/tests/Drivers/Gd/ImageTest.php @@ -70,9 +70,9 @@ class ImageTest extends TestCase public function testSetGetLoops(): void { - $this->assertEquals(0, $this->image->getLoops()); + $this->assertEquals(0, $this->image->loops()); $result = $this->image->setLoops(12); - $this->assertEquals(12, $this->image->getLoops()); + $this->assertEquals(12, $this->image->loops()); $this->assertInstanceOf(Image::class, $result); }