mirror of
https://github.com/retailcrm/mailgun-php.git
synced 2024-11-25 22:36:06 +03:00
Psalm fix
This commit is contained in:
parent
8d8f6510d2
commit
a3b0739f2b
@ -29,12 +29,11 @@ class Mailboxes extends HttpApi
|
|||||||
*
|
*
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function create(string $domain, array $parameters)
|
public function create(string $domain, array $parameters = [])
|
||||||
{
|
{
|
||||||
Assert::stringNotEmpty($domain);
|
Assert::stringNotEmpty($domain);
|
||||||
Assert::isArray($parameters);
|
Assert::keyExists($parameters, 'mailbox');
|
||||||
Assert::keyExists($parameters ,'mailbox');
|
Assert::keyExists($parameters, 'password');
|
||||||
Assert::keyExists($parameters ,'password');
|
|
||||||
Assert::minLength($parameters['password'], self::MIN_PASSWORD_LENGTH);
|
Assert::minLength($parameters['password'], self::MIN_PASSWORD_LENGTH);
|
||||||
|
|
||||||
$response = $this->httpPost(sprintf('/v3/%s/mailboxes', $domain), $parameters);
|
$response = $this->httpPost(sprintf('/v3/%s/mailboxes', $domain), $parameters);
|
||||||
@ -53,7 +52,6 @@ class Mailboxes extends HttpApi
|
|||||||
public function show(string $domain, array $parameters = [])
|
public function show(string $domain, array $parameters = [])
|
||||||
{
|
{
|
||||||
Assert::stringNotEmpty($domain);
|
Assert::stringNotEmpty($domain);
|
||||||
Assert::isArray($parameters);
|
|
||||||
|
|
||||||
$response = $this->httpGet(sprintf('/v3/%s/mailboxes', $domain), $parameters);
|
$response = $this->httpGet(sprintf('/v3/%s/mailboxes', $domain), $parameters);
|
||||||
|
|
||||||
@ -63,7 +61,7 @@ class Mailboxes extends HttpApi
|
|||||||
/**
|
/**
|
||||||
* @param string $domain
|
* @param string $domain
|
||||||
* @param string $mailbox
|
* @param string $mailbox
|
||||||
* @param array $parameters
|
* @param array $parameters
|
||||||
*
|
*
|
||||||
* @return UpdateResponse
|
* @return UpdateResponse
|
||||||
*
|
*
|
||||||
@ -73,7 +71,6 @@ class Mailboxes extends HttpApi
|
|||||||
{
|
{
|
||||||
Assert::stringNotEmpty($domain);
|
Assert::stringNotEmpty($domain);
|
||||||
Assert::stringNotEmpty($mailbox);
|
Assert::stringNotEmpty($mailbox);
|
||||||
Assert::isArray($parameters);
|
|
||||||
|
|
||||||
$response = $this->httpPut(sprintf('/v3/%s/mailboxes/%s', $domain, $mailbox), $parameters);
|
$response = $this->httpPut(sprintf('/v3/%s/mailboxes/%s', $domain, $mailbox), $parameters);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user