mirror of
https://github.com/retailcrm/transparent-email.git
synced 2024-11-21 21:06:04 +03:00
Code style
This commit is contained in:
parent
fda0dffdbc
commit
f499bd0fc6
@ -14,6 +14,7 @@ abstract class MultiDomain implements ServiceInterface
|
||||
if (!$this->isCaseSensitive()) {
|
||||
$email = strtolower($email);
|
||||
}
|
||||
|
||||
return explode('@', $email)[0] . '@' . $this->getPrimaryDomain();
|
||||
}
|
||||
|
||||
|
@ -16,12 +16,12 @@ class TransparentEmail
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $caseSensitiveLocalPart;
|
||||
private $caseSensitive;
|
||||
|
||||
public function __construct(ServiceCollectorInterface $services = null, bool $caseSensitiveLocalPart = false)
|
||||
public function __construct(ServiceCollectorInterface $services = null, bool $caseSensitive = false)
|
||||
{
|
||||
$this->services = $services ?: new DefaultServiceCollector();
|
||||
$this->caseSensitiveLocalPart = $caseSensitiveLocalPart;
|
||||
$this->caseSensitive = $caseSensitive;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -32,7 +32,7 @@ class TransparentEmail
|
||||
public function getPrimaryEmail(string $email)
|
||||
{
|
||||
$this->validateEmailAddress($email);
|
||||
if (!$this->caseSensitiveLocalPart) {
|
||||
if (!$this->caseSensitive) {
|
||||
$email = strtolower($email);
|
||||
}
|
||||
$domain = strtolower(explode('@', $email)[1]);
|
||||
|
Loading…
Reference in New Issue
Block a user