1 | <?php |
||
23 | class EmailChecker |
||
24 | { |
||
25 | protected $adapter; |
||
26 | |||
27 | /** |
||
28 | * @param AdapterInterface $adapter Checker adapter |
||
29 | */ |
||
30 | public function __construct(AdapterInterface $adapter = null) |
||
34 | |||
35 | /** |
||
36 | * Check if it's a valid email, ie. not a throwaway email. |
||
37 | * |
||
38 | * @param string $email The email to check |
||
39 | * |
||
40 | * @return bool true for a throwaway email |
||
41 | */ |
||
42 | public function isValid($email) |
||
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
$a
and$c
are used. There was no need to assign$b
.Instead, the list call could have been.