From bbd56d4f0ccd5667c50898d982270faf8df96172 Mon Sep 17 00:00:00 2001 From: Vincent Date: Wed, 18 Sep 2024 13:52:51 +0200 Subject: [PATCH] refactor: fix merge mistakes --- src/Config/ConnectorProvider.php | 9 ++++++--- src/MessageHandler/OrderDomainHandler.php | 4 ++-- src/Service/RDAPService.php | 1 - 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/Config/ConnectorProvider.php b/src/Config/ConnectorProvider.php index 9d3d16c..3454d16 100644 --- a/src/Config/ConnectorProvider.php +++ b/src/Config/ConnectorProvider.php @@ -2,19 +2,22 @@ namespace App\Config; -use App\Config\Provider\GandiProvider; -use App\Config\Provider\OvhProvider; +use App\Service\Connector\GandiProvider; +use App\Service\Connector\NamecheapConnector; +use App\Service\Connector\OvhProvider; enum ConnectorProvider: string { case OVH = 'ovh'; case GANDI = 'gandi'; + case NAMECHEAP = 'namecheap'; public function getConnectorProvider(): string { return match ($this) { ConnectorProvider::OVH => OvhProvider::class, - ConnectorProvider::GANDI => GandiProvider::class + ConnectorProvider::GANDI => GandiProvider::class, + ConnectorProvider::NAMECHEAP => NamecheapConnector::class, }; } } diff --git a/src/MessageHandler/OrderDomainHandler.php b/src/MessageHandler/OrderDomainHandler.php index b725dc2..bed9f96 100644 --- a/src/MessageHandler/OrderDomainHandler.php +++ b/src/MessageHandler/OrderDomainHandler.php @@ -14,6 +14,8 @@ use App\Service\StatService; use Psr\Cache\CacheItemPoolInterface; use Psr\Log\LoggerInterface; +use Symfony\Component\DependencyInjection\Attribute\Autowire; +use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpKernel\KernelInterface; use Symfony\Component\Mailer\Exception\TransportExceptionInterface; use Symfony\Component\Mailer\MailerInterface; @@ -33,8 +35,6 @@ public function __construct( private WatchListRepository $watchListRepository, private DomainRepository $domainRepository, private KernelInterface $kernel, - private HttpClientInterface $client, - private CacheItemPoolInterface $cacheItemPool, private MailerInterface $mailer, private LoggerInterface $logger, private StatService $statService, diff --git a/src/Service/RDAPService.php b/src/Service/RDAPService.php index 46dfe18..2805b27 100644 --- a/src/Service/RDAPService.php +++ b/src/Service/RDAPService.php @@ -165,7 +165,6 @@ public function registerDomain(string $fqdn): Domain /** @var ?Domain $domain */ $domain = $this->domainRepository->findOneBy(['ldhName' => $idnDomain]); - return $domain; $rdapServerUrl = $rdapServer->getUrl();