Skip to content

Commit

Permalink
Removed unused ProblemDetailsResponseFactory check
Browse files Browse the repository at this point in the history
Signed-off-by: alexmerlin <[email protected]>
  • Loading branch information
alexmerlin committed Oct 29, 2024
1 parent 6a69ccf commit dce1cbd
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/App/src/Factory/HandlerDelegatorFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
use Api\App\Message;
use Mezzio\Hal\HalResponseFactory;
use Mezzio\Hal\ResourceGenerator;
use Mezzio\ProblemDetails\ProblemDetailsResponseFactory;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\ContainerInterface;
use Psr\Container\NotFoundExceptionInterface;
Expand All @@ -34,15 +33,10 @@ public function __invoke(
if (! $container->has(HalResponseFactory::class)) {
throw new RuntimeException(sprintf(Message::SERVICE_NOT_FOUND, HalResponseFactory::class));
}

if (! $container->has(ResourceGenerator::class)) {
throw new RuntimeException(sprintf(Message::SERVICE_NOT_FOUND, ResourceGenerator::class));
}

if (! $container->has(ProblemDetailsResponseFactory::class)) {
throw new RuntimeException(sprintf(Message::SERVICE_NOT_FOUND, ProblemDetailsResponseFactory::class));
}

$handler = $callback();
assert($handler instanceof AbstractHandler);

Expand Down

0 comments on commit dce1cbd

Please sign in to comment.