mirror of
https://github.com/retailcrm/mailgun-php.git
synced 2024-11-29 16:36:07 +03:00
Psalm fix
This commit is contained in:
parent
8d8f6510d2
commit
a3b0739f2b
@ -29,10 +29,9 @@ 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);
|
||||||
@ -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);
|
||||||
|
|
||||||
@ -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