diff --git a/.travis.yml b/.travis.yml index 0d37892..7953c05 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,7 @@ php: - 5.6 - 7.0 - 7.1 + - 7.2 env: - TEST_COMMAND="composer test-all" diff --git a/src/Mailgun/Api/Domain.php b/src/Mailgun/Api/Domain.php index d592142..040462b 100644 --- a/src/Mailgun/Api/Domain.php +++ b/src/Mailgun/Api/Domain.php @@ -83,19 +83,18 @@ class Domain extends HttpApi * * @return CreateResponse|array|ResponseInterface */ - public function create($domain, $smtpPass = NULL, $spamAction = NULL, $wildcard = NULL) + public function create($domain, $smtpPass = null, $spamAction = null, $wildcard = null) { Assert::stringNotEmpty($domain); - - $params = ['name'] = $domain; - - // If at least smtpPass available, check for the fields spamAction wildcard - if(!empty($smtpPass) { + $params['name'] = $domain; + + // If at least smtpPass available, check for the fields spamAction wildcard + if (!empty($smtpPass)) { // TODO(sean.johnson): Extended spam filter input validation. Assert::stringNotEmpty($spamAction); Assert::boolean($wildcard); - + $params['smtp_password'] = $smtpPass; $params['spam_action'] = $spamAction; }