mirror of
https://github.com/retailcrm/mailgun-php.git
synced 2024-11-21 20:16:03 +03:00
Update .travis.yml and fix style (#414)
* Update .travis.yml * syntax fix * Apply fixes from StyleCI (#415) * Syntax fix
This commit is contained in:
parent
1fd4f222e6
commit
6dfd2b5a18
@ -11,6 +11,7 @@ php:
|
||||
- 5.6
|
||||
- 7.0
|
||||
- 7.1
|
||||
- 7.2
|
||||
|
||||
env:
|
||||
- TEST_COMMAND="composer test-all"
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user