Make Domain::Normalize() private

This commit is contained in:
the-djmaze 2024-03-10 23:58:54 +01:00
parent 1e55f86f51
commit de150b359c

View file

@ -30,7 +30,7 @@ class Domain implements \JsonSerializable
$this->Sieve = new \MailSo\Sieve\Settings;
}
public function Normalize()
private function Normalize()
{
$this->IMAP->host = \trim($this->IMAP->host);
$this->Sieve->host = \trim($this->Sieve->host);
@ -38,24 +38,6 @@ class Domain implements \JsonSerializable
$this->whiteList = \trim($this->whiteList);
}
/**
* Use by old fromIniArray()
*/
public static function StrConnectionSecurityTypeToCons(string $sType) : int
{
$iSecurityType = ConnectionSecurityType::NONE;
switch (\strtoupper($sType))
{
case 'SSL':
$iSecurityType = ConnectionSecurityType::SSL;
break;
case 'TLS':
$iSecurityType = ConnectionSecurityType::STARTTLS;
break;
}
return $iSecurityType;
}
public function Name() : string
{
return $this->Name;
@ -230,6 +212,24 @@ class Domain implements \JsonSerializable
return $oDomain;
}
/**
* Use by old RainLoop fromIniArray()
*/
public static function StrConnectionSecurityTypeToCons(string $sType) : int
{
$iSecurityType = ConnectionSecurityType::NONE;
switch (\strtoupper($sType))
{
case 'SSL':
$iSecurityType = ConnectionSecurityType::SSL;
break;
case 'TLS':
$iSecurityType = ConnectionSecurityType::STARTTLS;
break;
}
return $iSecurityType;
}
#[\ReturnTypeWillChange]
public function jsonSerialize()
{