Skip to content

Commit

Permalink
Rename class
Browse files Browse the repository at this point in the history
  • Loading branch information
olivervogel committed Oct 7, 2023
1 parent d9f4c24 commit d71448e
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/Drivers/Gd/Decoders/HexColorDecoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/Drivers/Gd/Decoders/RgbStringColorDecoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion src/Drivers/Gd/Decoders/TransparentColorDecoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion src/Drivers/Gd/InputHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/Drivers/Imagick/Decoders/HexColorDecoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/Drivers/Imagick/Decoders/TransparentColorDecoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion src/Drivers/Imagick/InputHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit d71448e

Please sign in to comment.