From f499bd0fc68570e2f0e125b85bf5fd0fe91d150b Mon Sep 17 00:00:00 2001 From: bkrukowski Date: Fri, 23 Sep 2016 21:46:00 +0200 Subject: [PATCH] Code style --- src/Services/MultiDomain.php | 1 + src/TransparentEmail.php | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Services/MultiDomain.php b/src/Services/MultiDomain.php index 791cb28..451d1e5 100644 --- a/src/Services/MultiDomain.php +++ b/src/Services/MultiDomain.php @@ -14,6 +14,7 @@ abstract class MultiDomain implements ServiceInterface if (!$this->isCaseSensitive()) { $email = strtolower($email); } + return explode('@', $email)[0] . '@' . $this->getPrimaryDomain(); } diff --git a/src/TransparentEmail.php b/src/TransparentEmail.php index 517ff12..4172243 100644 --- a/src/TransparentEmail.php +++ b/src/TransparentEmail.php @@ -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]);