<?php
namespace App\Controller\SpfCheck;
use App\Service\SpfChecker\SpfCheckActionHandler;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface;
use Symfony\Contracts\HttpClient\Exception\DecodingExceptionInterface;
use Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface;
use Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface;
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
/**
* Class SpfCheckAction.
*/
final class SpfCheckAction
{
/**
* @param SpfCheckActionHandler $spfCheckActionHandler
*
* @return JsonResponse
*
* @throws ClientExceptionInterface
* @throws DecodingExceptionInterface
* @throws RedirectionExceptionInterface
* @throws ServerExceptionInterface
* @throws TransportExceptionInterface
*/
public function __invoke(SpfCheckActionHandler $spfCheckActionHandler): JsonResponse
{
return new JsonResponse($spfCheckActionHandler->handle());
}
}