Skip to content

Commit

Permalink
Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
zbateson committed Aug 6, 2021
1 parent f042c5c commit 9e87313
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 17 deletions.
12 changes: 6 additions & 6 deletions src/Header/Part/AddressGroupPart.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
* Holds a group of addresses, and an optional group name.
*
* Because AddressGroupConsumer is only called once a colon (":") character is
* found, an AddressGroupPart is initially constructed without a $name. Once it is
* returned to AddressConsumer, a new AddressGroupPart is created out of
* found, an AddressGroupPart is initially constructed without a $name. Once it
* is returned to AddressConsumer, a new AddressGroupPart is created out of
* AddressGroupConsumer's AddressGroupPart.
*
* @author Zaahid Bateson
Expand Down Expand Up @@ -42,7 +42,7 @@ public function __construct(MbWrapper $charsetConverter, array $addresses, $name
/**
* Return the AddressGroupPart's array of addresses.
*
* @return AddressPart[]
* @return AddressPart[] An array of address parts.
*/
public function getAddresses()
{
Expand All @@ -52,8 +52,8 @@ public function getAddresses()
/**
* Returns the AddressPart at the passed index or null.
*
* @param int $index
* @return Address
* @param int $index The 0-based index.
* @return AddressPart|null The address.
*/
public function getAddress($index)
{
Expand All @@ -66,7 +66,7 @@ public function getAddress($index)
/**
* Returns the name of the group
*
* @return string
* @return string The name
*/
public function getName()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Header/Part/AddressPart.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function __construct(MbWrapper $charsetConverter, $name, $email)
/**
* Returns the email address.
*
* @return string
* @return string The email address.
*/
public function getEmail()
{
Expand Down
1 change: 1 addition & 0 deletions src/Header/Part/CommentPart.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* @license http://opensource.org/licenses/bsd-license.php BSD
*/
namespace ZBateson\MailMimeParser\Header\Part;

use ZBateson\MbWrapper\MbWrapper;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Header/Part/DatePart.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class DatePart extends LiteralPart
/**
* Tries parsing the passed token as an RFC 2822 date, and failing that into
* an RFC 822 date, and failing that, tries to parse it by calling
* ``` new DateTime($value) ```.
* new DateTime($value).
*
* @param MbWrapper $charsetConverter
* @param string $token
Expand Down
4 changes: 2 additions & 2 deletions src/Header/Part/ParameterPart.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function __construct(MbWrapper $charsetConverter, $name, $value, $languag
/**
* Returns the name of the parameter.
*
* @return string
* @return string The name.
*/
public function getName()
{
Expand All @@ -64,7 +64,7 @@ public function getName()
* Returns the RFC-1766 (or subset) language tag, if the parameter is a
* split RFC-2231 part with a language tag set.
*
* @return string
* @return string the language
*/
public function getLanguage()
{
Expand Down
14 changes: 8 additions & 6 deletions src/Header/Part/ReceivedDomainPart.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,13 @@ public function __construct(MbWrapper $charsetConverter, $name, $value, $ehloNam

/**
* Returns the name used to identify the server in the first part of the
* extended-domain line. Note that this is not necessarily the name used in
* the EHLO line to an SMTP server, since implementations differ so much,
* not much can be guaranteed except the position it was parsed in.
* extended-domain line.
*
* @return string
* Note that this is not necessarily the name used in the EHLO line to an
* SMTP server, since implementations differ so much, not much can be
* guaranteed except the position it was parsed in.
*
* @return string|null The name
*/
public function getEhloName()
{
Expand All @@ -78,7 +80,7 @@ public function getEhloName()
* Returns the hostname of the server, or whatever string in the hostname
* position when parsing (but never an address).
*
* @return string
* @return string|null
*/
public function getHostname()
{
Expand All @@ -89,7 +91,7 @@ public function getHostname()
* Returns the address of the server, or whatever string that looks like an
* address in the address position when parsing (but never a hostname).
*
* @return string
* @return string|null
*/
public function getAddress()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Header/Part/Token.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* A Token is meant to hold a value for further processing -- for instance when
* consuming an address list header (like From or To) -- before it's known what
* type of HeaderPart it is (could be an email address, could be a name, or
* type of IHeaderPart it is (could be an email address, could be a name, or
* could be a group.)
*
* @author Zaahid Bateson
Expand Down

0 comments on commit 9e87313

Please sign in to comment.