1
0
mirror of https://github.com/Intervention/image.git synced 2025-01-17 20:28:21 +01:00

Rename method

- ImageInterface::withoutProfile to ImageInterface::removeProfile
This commit is contained in:
Oliver Vogel 2023-10-26 16:46:25 +02:00
parent 65d2b68240
commit f08eee2bc4
4 changed files with 7 additions and 7 deletions

View File

@ -136,9 +136,9 @@ class Image extends AbstractImage implements ImageInterface, IteratorAggregate
/**
* {@inheritdoc}
*
* @see ImageInterface::withoutProfile()
* @see ImageInterface::removeProfile()
*/
public function withoutProfile(): ImageInterface
public function removeProfile(): ImageInterface
{
throw new NotSupportedException('Color profiles are not supported by GD driver.');
}

View File

@ -196,9 +196,9 @@ class Image extends AbstractImage implements ImageInterface, Iterator
/**
* {@inheritdoc}
*
* @see ImageInterface::withoutProfile()
* @see ImageInterface::removeProfile()
*/
public function withoutProfile(): ImageInterface
public function removeProfile(): ImageInterface
{
return $this->modify(new ProfileRemovalModifier());
}

View File

@ -191,7 +191,7 @@ interface ImageInterface extends Traversable, Countable
*
* @return ImageInterface
*/
public function withoutProfile(): ImageInterface;
public function removeProfile(): ImageInterface;
/**
* Draw text on image

View File

@ -145,12 +145,12 @@ class ImageTest extends TestCase
$this->assertInstanceOf(Image::class, $result);
}
public function testWithoutProfile(): void
public function testRemoveProfile(): void
{
$imagick = new Imagick();
$imagick->readImageBlob($this->getTestImageData('test.jpg'));
$image = new Image($imagick);
$result = $image->withoutProfile();
$result = $image->removeProfile();
$this->assertInstanceOf(Image::class, $result);
$this->expectException(ColorException::class);
$image->profile();