Skip to content

Commit

Permalink
removed incorrect array_keys()
Browse files Browse the repository at this point in the history
  • Loading branch information
eelco2k committed Aug 18, 2024
1 parent 839b92e commit 0f5babc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Http/Handlers.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ protected static function getTransformerFromUrlPath(): string
$routeApiVersion = request()->route(ApiService::getApiVersionParameterName());
$transformer = Str::kebab($routeApiVersion);

if ($transformer && !array_key_exists($transformer, array_keys(self::getApiTransformers()))) {
if ($transformer && !array_key_exists($transformer, self::getApiTransformers())) {
throw new TransformerNotFoundException($transformer);
}

Expand All @@ -162,7 +162,7 @@ protected static function getTransformerFromUrlQuery(): string
$transformer = request()->input($queryName);
$transformer = Str::kebab($transformer);

if ($transformer && !array_key_exists($transformer, array_keys(self::getApiTransformers()))) {
if ($transformer && !array_key_exists($transformer, self::getApiTransformers())) {
throw new TransformerNotFoundException($transformer);
}

Expand All @@ -186,7 +186,7 @@ protected static function getTransformerFromRequestHeader(): string
$transformer = request()->headers->get($headerName);
$transformer = Str::kebab($transformer);

if ($transformer && !array_key_exists($transformer, array_keys(self::getApiTransformers()))) {
if ($transformer && !array_key_exists($transformer, self::getApiTransformers())) {
throw new TransformerNotFoundException($transformer);
}

Expand Down

0 comments on commit 0f5babc

Please sign in to comment.