diff --git a/src/Drivers/Gd/Decoders/HexColorDecoder.php b/src/Drivers/Gd/Decoders/HexColorDecoder.php index 17134634d..8cb6b27b5 100644 --- a/src/Drivers/Gd/Decoders/HexColorDecoder.php +++ b/src/Drivers/Gd/Decoders/HexColorDecoder.php @@ -7,7 +7,7 @@ use Intervention\Image\Interfaces\DecoderInterface; use Intervention\Image\Interfaces\ImageInterface; -class HexColorDecoder extends ArrayColorDecoder implements DecoderInterface +class HexColorDecoder extends RgbArrayColorDecoder implements DecoderInterface { public function decode($input): ImageInterface|ColorInterface { diff --git a/src/Drivers/Gd/Decoders/ArrayColorDecoder.php b/src/Drivers/Gd/Decoders/RgbArrayColorDecoder.php similarity index 92% rename from src/Drivers/Gd/Decoders/ArrayColorDecoder.php rename to src/Drivers/Gd/Decoders/RgbArrayColorDecoder.php index 3d694e49c..8b25f691f 100644 --- a/src/Drivers/Gd/Decoders/ArrayColorDecoder.php +++ b/src/Drivers/Gd/Decoders/RgbArrayColorDecoder.php @@ -10,7 +10,7 @@ use Intervention\Image\Interfaces\ImageInterface; use Intervention\Image\Traits\CanValidateColors; -class ArrayColorDecoder extends AbstractDecoder implements DecoderInterface +class RgbArrayColorDecoder extends AbstractDecoder implements DecoderInterface { use CanValidateColors; diff --git a/src/Drivers/Gd/Decoders/RgbStringColorDecoder.php b/src/Drivers/Gd/Decoders/RgbStringColorDecoder.php index 300dd4a1b..03c46b960 100644 --- a/src/Drivers/Gd/Decoders/RgbStringColorDecoder.php +++ b/src/Drivers/Gd/Decoders/RgbStringColorDecoder.php @@ -7,7 +7,7 @@ use Intervention\Image\Interfaces\DecoderInterface; use Intervention\Image\Interfaces\ImageInterface; -class RgbStringColorDecoder extends ArrayColorDecoder implements DecoderInterface +class RgbStringColorDecoder extends RgbArrayColorDecoder implements DecoderInterface { public function decode($input): ImageInterface|ColorInterface { diff --git a/src/Drivers/Gd/Decoders/TransparentColorDecoder.php b/src/Drivers/Gd/Decoders/TransparentColorDecoder.php index 64f4adfcd..5cdd3d029 100644 --- a/src/Drivers/Gd/Decoders/TransparentColorDecoder.php +++ b/src/Drivers/Gd/Decoders/TransparentColorDecoder.php @@ -7,7 +7,7 @@ use Intervention\Image\Interfaces\DecoderInterface; use Intervention\Image\Interfaces\ImageInterface; -class TransparentColorDecoder extends ArrayColorDecoder implements DecoderInterface +class TransparentColorDecoder extends RgbArrayColorDecoder implements DecoderInterface { public function decode($input): ImageInterface|ColorInterface { diff --git a/src/Drivers/Gd/InputHandler.php b/src/Drivers/Gd/InputHandler.php index c100808c7..9fec013ba 100644 --- a/src/Drivers/Gd/InputHandler.php +++ b/src/Drivers/Gd/InputHandler.php @@ -9,7 +9,7 @@ class InputHandler extends AbstractInputHandler protected $decoders = [ Decoders\ImageObjectDecoder::class, Decoders\FilePointerImageDecoder::class, - Decoders\ArrayColorDecoder::class, + Decoders\RgbArrayColorDecoder::class, Decoders\HtmlColorNameDecoder::class, Decoders\RgbStringColorDecoder::class, Decoders\HexColorDecoder::class, diff --git a/src/Drivers/Imagick/Decoders/HexColorDecoder.php b/src/Drivers/Imagick/Decoders/HexColorDecoder.php index 84526d162..37498320b 100644 --- a/src/Drivers/Imagick/Decoders/HexColorDecoder.php +++ b/src/Drivers/Imagick/Decoders/HexColorDecoder.php @@ -7,7 +7,7 @@ use Intervention\Image\Interfaces\DecoderInterface; use Intervention\Image\Interfaces\ImageInterface; -class HexColorDecoder extends ArrayColorDecoder implements DecoderInterface +class HexColorDecoder extends RgbArrayColorDecoder implements DecoderInterface { public function decode($input): ImageInterface|ColorInterface { diff --git a/src/Drivers/Imagick/Decoders/ArrayColorDecoder.php b/src/Drivers/Imagick/Decoders/RgbArrayColorDecoder.php similarity index 92% rename from src/Drivers/Imagick/Decoders/ArrayColorDecoder.php rename to src/Drivers/Imagick/Decoders/RgbArrayColorDecoder.php index 12f8aaa22..2e924c87e 100644 --- a/src/Drivers/Imagick/Decoders/ArrayColorDecoder.php +++ b/src/Drivers/Imagick/Decoders/RgbArrayColorDecoder.php @@ -11,7 +11,7 @@ use Intervention\Image\Interfaces\ImageInterface; use Intervention\Image\Traits\CanValidateColors; -class ArrayColorDecoder extends AbstractDecoder implements DecoderInterface +class RgbArrayColorDecoder extends AbstractDecoder implements DecoderInterface { use CanValidateColors; diff --git a/src/Drivers/Imagick/Decoders/TransparentColorDecoder.php b/src/Drivers/Imagick/Decoders/TransparentColorDecoder.php index b93ef7063..097a35ff4 100644 --- a/src/Drivers/Imagick/Decoders/TransparentColorDecoder.php +++ b/src/Drivers/Imagick/Decoders/TransparentColorDecoder.php @@ -7,7 +7,7 @@ use Intervention\Image\Interfaces\DecoderInterface; use Intervention\Image\Interfaces\ImageInterface; -class TransparentColorDecoder extends ArrayColorDecoder implements DecoderInterface +class TransparentColorDecoder extends RgbArrayColorDecoder implements DecoderInterface { public function decode($input): ImageInterface|ColorInterface { diff --git a/src/Drivers/Imagick/InputHandler.php b/src/Drivers/Imagick/InputHandler.php index 3c751a297..8b00c35e8 100644 --- a/src/Drivers/Imagick/InputHandler.php +++ b/src/Drivers/Imagick/InputHandler.php @@ -9,7 +9,7 @@ class InputHandler extends AbstractInputHandler protected $decoders = [ Decoders\ImageObjectDecoder::class, Decoders\FilePointerImageDecoder::class, - Decoders\ArrayColorDecoder::class, + Decoders\RgbArrayColorDecoder::class, Decoders\HexColorDecoder::class, Decoders\HtmlColorNameDecoder::class, Decoders\RgbStringColorDecoder::class, diff --git a/tests/Drivers/Gd/Decoders/ArrayColorDecoderTest.php b/tests/Drivers/Gd/Decoders/RgbArrayColorDecoderTest.php similarity index 69% rename from tests/Drivers/Gd/Decoders/ArrayColorDecoderTest.php rename to tests/Drivers/Gd/Decoders/RgbArrayColorDecoderTest.php index d13920ea4..524b2f630 100644 --- a/tests/Drivers/Gd/Decoders/ArrayColorDecoderTest.php +++ b/tests/Drivers/Gd/Decoders/RgbArrayColorDecoderTest.php @@ -3,18 +3,18 @@ namespace Intervention\Image\Tests\Drivers\Gd\Decoders; use Intervention\Image\Drivers\Gd\Color; -use Intervention\Image\Drivers\Gd\Decoders\ArrayColorDecoder; +use Intervention\Image\Drivers\Gd\Decoders\RgbArrayColorDecoder; use Intervention\Image\Tests\TestCase; /** * @requires extension gd - * @covers \Intervention\Image\Drivers\Gd\Decoders\ArrayColorDecoder + * @covers \Intervention\Image\Drivers\Gd\Decoders\RgbArrayColorDecoder */ -class ArrayColorDecoderTest extends TestCase +class RgbArrayColorDecoderTest extends TestCase { public function testDecode(): void { - $decoder = new ArrayColorDecoder(); + $decoder = new RgbArrayColorDecoder(); $color = $decoder->decode([181, 55, 23, .5]); $this->assertInstanceOf(Color::class, $color); $this->assertEquals(181, $color->red()); diff --git a/tests/Drivers/Imagick/Decoders/ArrayColorDecoderTest.php b/tests/Drivers/Imagick/Decoders/RgbArrayColorDecoderTest.php similarity index 69% rename from tests/Drivers/Imagick/Decoders/ArrayColorDecoderTest.php rename to tests/Drivers/Imagick/Decoders/RgbArrayColorDecoderTest.php index 41301b0af..fbb5b4e0b 100644 --- a/tests/Drivers/Imagick/Decoders/ArrayColorDecoderTest.php +++ b/tests/Drivers/Imagick/Decoders/RgbArrayColorDecoderTest.php @@ -3,18 +3,18 @@ namespace Intervention\Image\Tests\Drivers\Imagick\Decoders; use Intervention\Image\Drivers\Imagick\Color; -use Intervention\Image\Drivers\Imagick\Decoders\ArrayColorDecoder; +use Intervention\Image\Drivers\Imagick\Decoders\RgbArrayColorDecoder; use Intervention\Image\Tests\TestCase; /** * @requires extension imagick - * @covers \Intervention\Image\Drivers\Imagick\Decoders\ArrayColorDecoder + * @covers \Intervention\Image\Drivers\Imagick\Decoders\RgbArrayColorDecoder */ -class ArrayColorDecoderTest extends TestCase +class RgbArrayColorDecoderTest extends TestCase { public function testDecode(): void { - $decoder = new ArrayColorDecoder(); + $decoder = new RgbArrayColorDecoder(); $color = $decoder->decode([181, 55, 23, .5]); $this->assertInstanceOf(Color::class, $color); $this->assertEquals(181, $color->red());