1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-05 05:17:26 +02: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} * {@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.'); 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} * {@inheritdoc}
* *
* @see ImageInterface::withoutProfile() * @see ImageInterface::removeProfile()
*/ */
public function withoutProfile(): ImageInterface public function removeProfile(): ImageInterface
{ {
return $this->modify(new ProfileRemovalModifier()); return $this->modify(new ProfileRemovalModifier());
} }

View File

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

View File

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