email icon indicating copy to clipboard operation
email copied to clipboard

Email::context() interface is not clear

Open samdark opened this issue 8 years ago • 0 comments

Email::context() currently may return two different objects Message and Part. Later return of the method is used in the way that it depends on which object was returned.

  • https://github.com/bashkarev/email/blob/master/src/parser/tokens/Content.php#L29
  • https://github.com/bashkarev/email/blob/master/src/parser/tokens/Header.php#L55

Overall that is quite confusing...

samdark avatar Feb 24 '17 22:02 samdark