format: fix psr12 style issues
phpcbf auto-fixes: string concatenation spacing, single-line class braces, closing brace placement.
This commit is contained in:
parent
9703f82788
commit
56ddba707d
27 changed files with 39 additions and 20 deletions
|
|
@ -18,15 +18,15 @@ final readonly class EmailAddress
|
|||
$trimmed = trim($email);
|
||||
|
||||
if ($trimmed === '' || ! str_contains($trimmed, '@')) {
|
||||
throw new InvalidArgumentException(self::ERROR_MESSAGE." $email");
|
||||
throw new InvalidArgumentException(self::ERROR_MESSAGE . " $email");
|
||||
}
|
||||
|
||||
[$local, $domain] = explode('@', $trimmed, 2);
|
||||
$this->domain = mb_strtolower($domain);
|
||||
$normalized = $local.'@'.$this->domain;
|
||||
$normalized = $local . '@' . $this->domain;
|
||||
|
||||
if (filter_var($normalized, FILTER_VALIDATE_EMAIL) === false) {
|
||||
throw new InvalidArgumentException(self::ERROR_MESSAGE." $email");
|
||||
throw new InvalidArgumentException(self::ERROR_MESSAGE . " $email");
|
||||
}
|
||||
|
||||
$this->normalized = $normalized;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue