@@ -53,16 +53,16 @@ |
||
53 | 53 | |
54 | 54 | public function __construct(array $config = []) |
55 | 55 | { |
56 | - $this->checkMxRecords = (bool) ($config['checkMxRecords'] ?? true); |
|
56 | + $this->checkMxRecords = (bool) ($config['checkMxRecords'] ?? true); |
|
57 | 57 | $this->checkBannedListedEmail = (bool) ($config['checkBannedListedEmail'] ?? false); |
58 | - $this->checkDisposableEmail = (bool) ($config['checkDisposableEmail'] ?? false); |
|
59 | - $this->checkFreeEmail = (bool) ($config['checkFreeEmail'] ?? false); |
|
60 | - $this->localDisposableOnly = (bool) ($config['LocalDisposableOnly'] ?? false); |
|
61 | - $this->localFreeOnly = (bool) ($config['LocalFreeOnly'] ?? false); |
|
58 | + $this->checkDisposableEmail = (bool) ($config['checkDisposableEmail'] ?? false); |
|
59 | + $this->checkFreeEmail = (bool) ($config['checkFreeEmail'] ?? false); |
|
60 | + $this->localDisposableOnly = (bool) ($config['LocalDisposableOnly'] ?? false); |
|
61 | + $this->localFreeOnly = (bool) ($config['LocalFreeOnly'] ?? false); |
|
62 | 62 | |
63 | - $this->bannedList = $config['bannedList'] ?? []; |
|
63 | + $this->bannedList = $config['bannedList'] ?? []; |
|
64 | 64 | $this->disposableList = $config['disposableList'] ?? []; |
65 | - $this->freeList = $config['freeList'] ?? []; |
|
65 | + $this->freeList = $config['freeList'] ?? []; |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | /** |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | } |
129 | 129 | |
130 | 130 | // Check for valid characters in each atom |
131 | - return (bool)preg_match('/^[a-zA-Z0-9!#$%&\'*+\-\/=?^_`{|}~]+$/', $atom); |
|
131 | + return (bool) preg_match('/^[a-zA-Z0-9!#$%&\'*+\-\/=?^_`{|}~]+$/', $atom); |
|
132 | 132 | } |
133 | 133 | |
134 | 134 | /** |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | */ |
164 | 164 | private function hasValidQuotes(string $localPart): bool |
165 | 165 | { |
166 | - return (bool)preg_match('/^".*"$/', $localPart); |
|
166 | + return (bool) preg_match('/^".*"$/', $localPart); |
|
167 | 167 | } |
168 | 168 | |
169 | 169 | /** |
@@ -338,7 +338,7 @@ discard block |
||
338 | 338 | */ |
339 | 339 | private function hasValidLabelFormat(string $label): bool |
340 | 340 | { |
341 | - return (bool)preg_match('/^[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]$/', $label); |
|
341 | + return (bool) preg_match('/^[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]$/', $label); |
|
342 | 342 | } |
343 | 343 | |
344 | 344 | /** |
@@ -401,7 +401,7 @@ discard block |
||
401 | 401 | } |
402 | 402 | |
403 | 403 | // Convert to standard format for final validation |
404 | - $ipv6 = implode(':', array_map(function ($segment) { |
|
404 | + $ipv6 = implode(':', array_map(function($segment) { |
|
405 | 405 | return str_pad($segment, 4, '0', STR_PAD_LEFT); |
406 | 406 | }, $segments)); |
407 | 407 | |
@@ -465,7 +465,7 @@ discard block |
||
465 | 465 | } |
466 | 466 | |
467 | 467 | // Convert to standard format for final validation |
468 | - $ipv4 = implode('.', array_map(function ($octet) { |
|
468 | + $ipv4 = implode('.', array_map(function($octet) { |
|
469 | 469 | return ltrim($octet, '0') ?: '0'; |
470 | 470 | }, $octets)); |
471 | 471 |