Skip to content

Commit

Permalink
Correct method name
Browse files Browse the repository at this point in the history
  • Loading branch information
olivervogel committed Apr 22, 2024
1 parent 9b3abba commit 53219e2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Format.php
Expand Up @@ -108,7 +108,7 @@ public function encoder(mixed ...$options): EncoderInterface
self::WEBP => WebpEncoder::class,
};

// get allowed parameters of target encoder
// get parameters of target encoder
$parameters = [];
$reflectionClass = new ReflectionClass($classname);
if ($constructor = $reflectionClass->getConstructor()) {
Expand All @@ -118,7 +118,7 @@ public function encoder(mixed ...$options): EncoderInterface
);
}

// filter only allowed options
// filter out unavailable options for target encoder
$options = array_filter(
$options,
fn ($key) => in_array($key, $parameters),
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Encoders/MediaTypeEncoderTest.php
Expand Up @@ -41,7 +41,7 @@ public function test($mediaType)
}

#[DataProvider('targetEncoderProvider')]
public function testEncoderByFileExtensionString(
public function testEncoderByMediaType(
string $mediaType,
string $targetEncoderClassname,
): void {
Expand Down

0 comments on commit 53219e2

Please sign in to comment.