| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 3 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 26 | 11 | public function isValid($email, EmailLexer $emailLexer) |
|
| 27 | { |
||
| 28 | // use the input to check DNS if we cannot extract something similar to a domain |
||
| 29 | 11 | $host = $email; |
|
| 30 | |||
| 31 | // Arguable pattern to extract the domain. Not aiming to validate the domain nor the email |
||
| 32 | 11 | if (false !== $lastAtPos = strrpos($email, '@')) { |
|
| 33 | 11 | $host = substr($email, $lastAtPos + 1); |
|
| 34 | 11 | } |
|
| 35 | |||
| 36 | 11 | return $this->checkDNS($host); |
|
| 37 | } |
||
| 38 | |||
| 64 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..