src/Controller/SpfCheck/SpfCheckAction.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Controller\SpfCheck;
  3. use App\Service\SpfChecker\SpfCheckActionHandler;
  4. use Symfony\Component\HttpFoundation\JsonResponse;
  5. use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface;
  6. use Symfony\Contracts\HttpClient\Exception\DecodingExceptionInterface;
  7. use Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface;
  8. use Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface;
  9. use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
  10. /**
  11.  * Class SpfCheckAction.
  12.  */
  13. final class SpfCheckAction
  14. {
  15.     /**
  16.      * @param SpfCheckActionHandler $spfCheckActionHandler
  17.      *
  18.      * @return JsonResponse
  19.      *
  20.      * @throws ClientExceptionInterface
  21.      * @throws DecodingExceptionInterface
  22.      * @throws RedirectionExceptionInterface
  23.      * @throws ServerExceptionInterface
  24.      * @throws TransportExceptionInterface
  25.      */
  26.     public function __invoke(SpfCheckActionHandler $spfCheckActionHandler): JsonResponse
  27.     {
  28.         return new JsonResponse($spfCheckActionHandler->handle());
  29.     }
  30. }