Conditions | 3 |
Paths | 4 |
Total Lines | 6 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
46 | 1 | public static function domainAcceptsEmails(string $hostnameOrEmail): bool |
|
47 | { |
||
48 | 1 | if (strpos($hostnameOrEmail, '@') !== false) { |
|
49 | 1 | [$void, $hostnameOrEmail] = explode('@', $hostnameOrEmail, 2); |
|
50 | } |
||
51 | 1 | return self::existsMx($hostnameOrEmail) || self::existsA($hostnameOrEmail); |
|
52 | } |
||
54 |