From dce1cbd95d1ef3d8cdea1eeac2efd8887c94772b Mon Sep 17 00:00:00 2001 From: alexmerlin Date: Tue, 29 Oct 2024 11:51:52 +0200 Subject: [PATCH] Removed unused ProblemDetailsResponseFactory check Signed-off-by: alexmerlin --- src/App/src/Factory/HandlerDelegatorFactory.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/App/src/Factory/HandlerDelegatorFactory.php b/src/App/src/Factory/HandlerDelegatorFactory.php index ad0ca6b..7640842 100644 --- a/src/App/src/Factory/HandlerDelegatorFactory.php +++ b/src/App/src/Factory/HandlerDelegatorFactory.php @@ -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; @@ -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);