Skip to content

Commit

Permalink
Merge pull request laminas#126 from glensc/codestyle-types
Browse files Browse the repository at this point in the history
[2.14]: QA: Add specific type hints for $params
  • Loading branch information
Slamdunk authored Mar 15, 2021
2 parents 33c9846 + 1ea9b8f commit ea7b5cd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/Storage/Imap.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

namespace Laminas\Mail\Storage;

use Laminas\Config\Config;
use Laminas\Mail;
use Laminas\Mail\Protocol;

Expand Down Expand Up @@ -168,6 +169,7 @@ public function getRawContent($id, $part = null)
return $this->protocol->fetch('RFC822.TEXT', $id);
}

// @codingStandardsIgnoreStart
/**
* create instance with parameters
*
Expand All @@ -180,11 +182,12 @@ public function getRawContent($id, $part = null)
* - ssl 'SSL' or 'TLS' for secure sockets
* - folder select this folder [optional, default = 'INBOX']
*
* @param array|Protocol\Imap $params mail reader specific parameters or configured Imap protocol object
* @param array|object|Config|Protocol\Imap $params mail reader specific parameters or configured Imap protocol object
* @throws Exception\RuntimeException
* @throws Exception\InvalidArgumentException
* @throws Protocol\Exception\RuntimeException
*/
// @codingStandardsIgnoreEnd
public function __construct($params)
{
if (is_array($params)) {
Expand Down
5 changes: 4 additions & 1 deletion src/Storage/Pop3.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

namespace Laminas\Mail\Storage;

use Laminas\Config\Config;
use Laminas\Mail\Exception as MailException;
use Laminas\Mail\Protocol;
use Laminas\Mime;
Expand Down Expand Up @@ -112,6 +113,7 @@ public function getRawContent($id, $part = null)
return $body;
}

// @codingStandardsIgnoreStart
/**
* create instance with parameters
* Supported parameters are
Expand All @@ -121,10 +123,11 @@ public function getRawContent($id, $part = null)
* - port port for POP3 server [optional, default = 110]
* - ssl 'SSL' or 'TLS' for secure sockets
*
* @param array|Protocol\Pop3 $params mail reader specific parameters or configured Pop3 protocol object
* @param array|object|Config|Protocol\Pop3 $params mail reader specific parameters or configured Pop3 protocol object
* @throws \Laminas\Mail\Storage\Exception\InvalidArgumentException
* @throws \Laminas\Mail\Protocol\Exception\RuntimeException
*/
// @codingStandardsIgnoreEnd
public function __construct($params)
{
if (is_array($params)) {
Expand Down

0 comments on commit ea7b5cd

Please sign in to comment.