mail-mime-parser icon indicating copy to clipboard operation
mail-mime-parser copied to clipboard

Return types mismatch (AddressHeader::getEmail)

Open rskrzypczak opened this issue 3 years ago • 1 comments

A trivial thing, but it causes confusion :) https://github.com/zbateson/mail-mime-parser/blob/dd3fafea57ed8b0daca57ed95ed0eda81fe14a7d/src/Header/AddressHeader.php#L107-L115

https://github.com/zbateson/mail-mime-parser/blob/dd3fafea57ed8b0daca57ed95ed0eda81fe14a7d/src/Header/AbstractHeader.php#L82-L88

string, null? can this by more strict and consistent?

rskrzypczak avatar Jan 25 '22 06:01 rskrzypczak

@rskrzypczak -- what do you propose? Looks to me like getEmail needs to be string|null. Feel free to go through it and submit pull requests where you find inconsistencies.

zbateson avatar Jan 25 '22 16:01 zbateson