| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 42 | public function isValid($email) |
||
| 43 | { |
||
| 44 | if (false === $email = filter_var($email, FILTER_VALIDATE_EMAIL)) { |
||
| 45 | return false; |
||
| 46 | } |
||
| 47 | |||
| 48 | try { |
||
| 49 | list($local, $domain) = Utilities::parseEmailAddress($email); |
||
|
|
|||
| 50 | } catch (InvalidEmailException $e) { |
||
| 51 | return false; |
||
| 52 | } |
||
| 53 | |||
| 54 | return !$this->adapter->isThrowawayDomain($domain); |
||
| 55 | } |
||
| 56 | } |
||
| 57 |
This checks looks for assignemnts to variables using the
list(...)function, where not all assigned variables are subsequently used.Consider the following code example.
Only the variables
$aand$care used. There was no need to assign$b.Instead, the list call could have been.