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:
@@ -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) {
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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();
|
||||
}
|
||||
|
@@ -46,7 +46,7 @@ interface ImageInterface extends Traversable, Countable
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getLoops(): int;
|
||||
public function loops(): int;
|
||||
|
||||
/**
|
||||
* Return size of current image
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user