mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
fix: identify tld type
This commit is contained in:
@@ -339,15 +339,13 @@ readonly class RDAPService
|
||||
$tldEntity = $this->tldRepository->findOneBy(['tld' => $tld]);
|
||||
if ($tldEntity === null) $tldEntity = new Tld();
|
||||
|
||||
if ($tldEntity->getType() === null) {
|
||||
$type = $this->getTldType($tld);
|
||||
if ($type !== null) {
|
||||
$tldEntity->setType($type);
|
||||
} elseif ($tldEntity->isContractTerminated() === null) {
|
||||
$tldEntity->setType(TldType::ccTLD);
|
||||
} else {
|
||||
$tldEntity->setType(TldType::gTLD);
|
||||
}
|
||||
$type = $this->getTldType($tld);
|
||||
if ($type !== null) {
|
||||
$tldEntity->setType($type);
|
||||
} elseif ($tldEntity->isContractTerminated() === null) {
|
||||
$tldEntity->setType(TldType::ccTLD);
|
||||
} else {
|
||||
$tldEntity->setType(TldType::gTLD);
|
||||
}
|
||||
|
||||
$this->em->persist($tldEntity);
|
||||
|
||||
Reference in New Issue
Block a user