diff --git a/.travis.yml b/.travis.yml index 27e83fe..80487bf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,7 +30,7 @@ matrix: script: ./vendor/bin/roave-backward-compatibility-check || true - name: PHPStan php: 7.2 - env: DEPENDENCIES="phpstan/phpstan phpstan/phpstan-webmozart-assert" + env: DEPENDENCIES="phpstan/phpstan" script: ./vendor/bin/phpstan analyse src before_install: diff --git a/phpstan.neon b/phpstan.neon index 0ae4ea2..1b8a12e 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,5 +1,3 @@ parameters: level: 5 -includes: - - vendor/phpstan/phpstan-webmozart-assert/extension.neon diff --git a/src/Api/EmailValidation.php b/src/Api/EmailValidation.php index 68a0865..42c71c7 100644 --- a/src/Api/EmailValidation.php +++ b/src/Api/EmailValidation.php @@ -70,7 +70,7 @@ class EmailValidation extends HttpApi * This operation is only accessible with the private API key and not subject to the daily usage limits. * * @param string $addresses A delimiter separated list of addresses. Maximum: 8000 characters. - * @param bool| $syntaxOnly Perform only syntax checks or DNS and ESP specific validation as well. + * @param bool $syntaxOnly Perform only syntax checks or DNS and ESP specific validation as well. * The default is True. * * @throws InvalidArgumentException Thrown when local validation returns an error diff --git a/src/Model/EmailValidation/Parts.php b/src/Model/EmailValidation/Parts.php index 90dfc64..97146dd 100644 --- a/src/Model/EmailValidation/Parts.php +++ b/src/Model/EmailValidation/Parts.php @@ -1,5 +1,7 @@ displayName; } - /** - * @return null|string - */ public function getDomain(): ?string { return $this->domain; } - /** - * @return null|string - */ public function getLocalPart(): ?string { return $this->localPart; diff --git a/src/Model/EmailValidation/ValidateResponse.php b/src/Model/EmailValidation/ValidateResponse.php index 445bdcd..bc2f285 100644 --- a/src/Model/EmailValidation/ValidateResponse.php +++ b/src/Model/EmailValidation/ValidateResponse.php @@ -12,7 +12,6 @@ declare(strict_types=1); namespace Mailgun\Model\EmailValidation; use Mailgun\Model\ApiResponse; -use Mailgun\Model\EmailValidation\EmailValidation; /** * @author David Garcia diff --git a/tests/Model/EmailValidation/ParseResponseTest.php b/tests/Model/EmailValidation/ParseResponseTest.php index b3e2b6d..8840a8d 100644 --- a/tests/Model/EmailValidation/ParseResponseTest.php +++ b/tests/Model/EmailValidation/ParseResponseTest.php @@ -2,10 +2,16 @@ declare(strict_types=1); +/* + * Copyright (C) 2013 Mailgun + * + * This software may be modified and distributed under the terms + * of the MIT license. See the LICENSE file for details. + */ + namespace Mailgun\Tests\Model\EmailValidation; use Mailgun\Model\EmailValidation\ParseResponse; -use Mailgun\Model\EmailValidation\ValidateResponse; use Mailgun\Tests\Model\BaseModelTest; class ParseResponseTest extends BaseModelTest @@ -31,7 +37,6 @@ JSON; public function testParseConstructorWithValidData() { - $data = [ 'parsed' => ['parsed data'], 'unparseable' => ['unparseable data'], @@ -45,7 +50,6 @@ JSON; public function testParseConstructorWithInvalidData() { - $data = [ 'parsed' => null, 'unparseable' => null, @@ -56,5 +60,4 @@ JSON; $this->assertEquals([], $parts->getParsed()); $this->assertEquals([], $parts->getUnparseable()); } - } diff --git a/tests/Model/EmailValidation/PartsTest.php b/tests/Model/EmailValidation/PartsTest.php index 7df9040..abcc0a5 100644 --- a/tests/Model/EmailValidation/PartsTest.php +++ b/tests/Model/EmailValidation/PartsTest.php @@ -1,5 +1,7 @@ ' Display name', 'domain' => 'Domain', diff --git a/tests/Model/EmailValidation/ValidateResponseTest.php b/tests/Model/EmailValidation/ValidateResponseTest.php index 05fc72c..d5aa6bf 100644 --- a/tests/Model/EmailValidation/ValidateResponseTest.php +++ b/tests/Model/EmailValidation/ValidateResponseTest.php @@ -2,6 +2,13 @@ declare(strict_types=1); +/* + * Copyright (C) 2013 Mailgun + * + * This software may be modified and distributed under the terms + * of the MIT license. See the LICENSE file for details. + */ + namespace Mailgun\Tests\Model\EmailValidation; use Mailgun\Model\EmailValidation\Parts; @@ -30,7 +37,6 @@ class ValidateResponseTest extends BaseModelTest JSON; $model = ValidateResponse::create(json_decode($json, true)); $this->assertTrue($model->isMailboxVerification()); - } public function testCreateWithoutMailboxVerification() @@ -54,12 +60,10 @@ JSON; JSON; $model = ValidateResponse::create(json_decode($json, true)); $this->assertFalse($model->isMailboxVerification()); - } public function testEmailValidation() { - $data = [ 'address' => 'foo@mailgun.net', 'did_you_mean' => null,