1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-28 08:09:54 +02:00

Rename method

- ImageInterface::getLoops to ImageInterface::loops
This commit is contained in:
Oliver Vogel
2023-10-26 16:22:41 +02:00
parent 8b175434ab
commit af5f8f0a43
5 changed files with 6 additions and 6 deletions

View File

@@ -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) {

View File

@@ -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;
}

View File

@@ -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();
}

View File

@@ -46,7 +46,7 @@ interface ImageInterface extends Traversable, Countable
*
* @return int
*/
public function getLoops(): int;
public function loops(): int;
/**
* Return size of current image

View File

@@ -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);
}