mirror of
https://github.com/egulias/EmailValidator.git
synced 2026-09-10 18:16:41 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c26463ff92 | |||
| a09af2de87 | |||
| c802f106b3 |
+3
-4
@@ -9,7 +9,6 @@ php:
|
|||||||
- 7.1
|
- 7.1
|
||||||
- 7.2
|
- 7.2
|
||||||
- 7.3
|
- 7.3
|
||||||
- hhvm
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
@@ -29,8 +28,8 @@ install:
|
|||||||
- if [ "$deps" = "high" ]; then composer update; fi
|
- if [ "$deps" = "high" ]; then composer update; fi
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- mkdir -p build/logs
|
- mkdir -p build/logs
|
||||||
- vendor/bin/phpunit --coverage-clover build/logs/clover.xml
|
- vendor/bin/phpunit --coverage-clover build/logs/clover.xml
|
||||||
|
|
||||||
after_script:
|
after_script:
|
||||||
- php vendor/bin/coveralls
|
- php vendor/bin/coveralls
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ class EmailLexer extends AbstractLexer
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $type
|
* @param string $type
|
||||||
* @throws \UnexpectedValueException
|
* @throws \UnexpectedValueException
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
@@ -189,7 +189,7 @@ class EmailLexer extends AbstractLexer
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $value
|
* @param string $value
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
protected function isNullType($value)
|
protected function isNullType($value)
|
||||||
@@ -202,7 +202,7 @@ class EmailLexer extends AbstractLexer
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $value
|
* @param string $value
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
protected function isUTF8Invalid($value)
|
protected function isUTF8Invalid($value)
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ class EmailParser
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $str
|
* @param string $str
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function parse($str)
|
public function parse($str)
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ class EmailValidator
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $email
|
* @param string $email
|
||||||
* @param EmailValidation $emailValidation
|
* @param EmailValidation $emailValidation
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace Egulias\EmailValidator\Exception;
|
namespace Egulias\EmailValidator\Exception;
|
||||||
|
|
||||||
class ExpectedQPair extends InvalidEmail
|
class ExpectingQPair extends InvalidEmail
|
||||||
{
|
{
|
||||||
const CODE = 136;
|
const CODE = 136;
|
||||||
const REASON = "Expecting QPAIR";
|
const REASON = "Expecting QPAIR";
|
||||||
|
|||||||
@@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
namespace Egulias\EmailValidator\Exception;
|
namespace Egulias\EmailValidator\Exception;
|
||||||
|
|
||||||
use Egulias\EmailValidator\Exception\InvalidEmail;
|
|
||||||
|
|
||||||
class NoDNSRecord extends InvalidEmail
|
class NoDNSRecord extends InvalidEmail
|
||||||
{
|
{
|
||||||
const CODE = 5;
|
const CODE = 5;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ use Egulias\EmailValidator\Exception\ConsecutiveDot;
|
|||||||
use Egulias\EmailValidator\Exception\CRLFAtTheEnd;
|
use Egulias\EmailValidator\Exception\CRLFAtTheEnd;
|
||||||
use Egulias\EmailValidator\Exception\CRLFX2;
|
use Egulias\EmailValidator\Exception\CRLFX2;
|
||||||
use Egulias\EmailValidator\Exception\CRNoLF;
|
use Egulias\EmailValidator\Exception\CRNoLF;
|
||||||
use Egulias\EmailValidator\Exception\ExpectedQPair;
|
use Egulias\EmailValidator\Exception\ExpectingQPair;
|
||||||
use Egulias\EmailValidator\Exception\ExpectingATEXT;
|
use Egulias\EmailValidator\Exception\ExpectingATEXT;
|
||||||
use Egulias\EmailValidator\Exception\ExpectingCTEXT;
|
use Egulias\EmailValidator\Exception\ExpectingCTEXT;
|
||||||
use Egulias\EmailValidator\Exception\UnclosedComment;
|
use Egulias\EmailValidator\Exception\UnclosedComment;
|
||||||
@@ -50,7 +50,7 @@ abstract class Parser
|
|||||||
{
|
{
|
||||||
if (!($this->lexer->token['type'] === EmailLexer::INVALID
|
if (!($this->lexer->token['type'] === EmailLexer::INVALID
|
||||||
|| $this->lexer->token['type'] === EmailLexer::C_DEL)) {
|
|| $this->lexer->token['type'] === EmailLexer::C_DEL)) {
|
||||||
throw new ExpectedQPair();
|
throw new ExpectingQPair();
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->warnings[QuotedPart::CODE] =
|
$this->warnings[QuotedPart::CODE] =
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# EmailValidator
|
# EmailValidator
|
||||||
[](https://travis-ci.org/egulias/EmailValidator) [](https://coveralls.io/r/egulias/EmailValidator?branch=master) [](https://scrutinizer-ci.com/g/egulias/EmailValidator/?branch=master) [](https://insight.sensiolabs.com/projects/22ba6692-9c02-42e5-a65d-1c5696bfffc6)
|
[](https://travis-ci.org/egulias/EmailValidator) [](https://coveralls.io/r/egulias/EmailValidator?branch=master) [](https://scrutinizer-ci.com/g/egulias/EmailValidator/?branch=master) [](https://insight.sensiolabs.com/projects/22ba6692-9c02-42e5-a65d-1c5696bfffc6)
|
||||||
=============================
|
=============================
|
||||||
## Suported RFCs ##
|
## Suported RFCs ##
|
||||||
This library aims to support:
|
This library aims to support:
|
||||||
@@ -16,7 +16,7 @@ RFC 5321, 5322, 6530, 6531, 6532.
|
|||||||
Run the command below to install via Composer
|
Run the command below to install via Composer
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
composer require egulias/email-validator "~2.1"
|
composer require egulias/email-validator
|
||||||
```
|
```
|
||||||
|
|
||||||
## Getting Started ##
|
## Getting Started ##
|
||||||
|
|||||||
Reference in New Issue
Block a user