Skip to content

Commit

Permalink
Rename class Encode to Encoder.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Oct 27, 2024
1 parent 6313aea commit d622476
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Api/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function run(string $source, array $params): string
*/
public function encode(ImageInterface $image, array $params): string
{
$encoder = new Encode($params);
$encoder = new Encoder($params);
$encoded = $encoder->run($image);

return $encoded->toString();
Expand Down
2 changes: 1 addition & 1 deletion src/Api/Encode.php → src/Api/Encoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/**
* Encoder Api class to convert a given image to a specific format.
*/
class Encode
class Encoder
{
/**
* The manipulation params.
Expand Down
10 changes: 5 additions & 5 deletions tests/Api/EncodeTest.php → tests/Api/EncoderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
use Mockery;
use PHPUnit\Framework\TestCase;

class EncodeTest extends TestCase
class EncoderTest extends TestCase
{
private Encode $encoder;
private Encoder $encoder;
private ImageInterface $jpg;
private ImageInterface $png;
private ImageInterface $gif;
Expand Down Expand Up @@ -45,7 +45,7 @@ public function setUp(): void
);
}

$this->encoder = new Encode();
$this->encoder = new Encoder();
}

public function tearDown(): void
Expand All @@ -58,7 +58,7 @@ public function testCreateInstance(): void
/**
* @psalm-suppress ArgumentTypeCoercion
*/
$this->assertInstanceOf('League\Glide\Api\Encode', $this->encoder);
$this->assertInstanceOf(Encoder::class, $this->encoder);
}

public function testRun(): void
Expand Down Expand Up @@ -195,7 +195,7 @@ public function testSupportedFormats(): void
'heic' => 'image/heic',
];

$this->assertSame($expected, Encode::supportedFormats());
$this->assertSame($expected, Encoder::supportedFormats());
}

protected function getMime(EncodedImageInterface $image): string
Expand Down

0 comments on commit d622476

Please sign in to comment.