composer update
This commit is contained in:
@@ -77,10 +77,25 @@ class EmailLexer extends AbstractLexer
|
||||
|
||||
protected $previous;
|
||||
|
||||
private static $nullToken = [
|
||||
'value' => '',
|
||||
'type' => null,
|
||||
'position' => 0,
|
||||
];
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->previous = $this->token = self::$nullToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function reset()
|
||||
{
|
||||
$this->hasInvalidTokens = false;
|
||||
parent::reset();
|
||||
$this->previous = $this->token = self::$nullToken;
|
||||
}
|
||||
|
||||
public function hasInvalidTokens()
|
||||
@@ -122,8 +137,10 @@ class EmailLexer extends AbstractLexer
|
||||
public function moveNext()
|
||||
{
|
||||
$this->previous = $this->token;
|
||||
$hasNext = parent::moveNext();
|
||||
$this->token = $this->token ?: self::$nullToken;
|
||||
|
||||
return parent::moveNext();
|
||||
return $hasNext;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -214,6 +231,9 @@ class EmailLexer extends AbstractLexer
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
protected function getModifiers()
|
||||
{
|
||||
return 'iu';
|
||||
|
||||
@@ -184,7 +184,7 @@ class DomainPart extends Parser
|
||||
|
||||
$domain .= $this->lexer->token['value'];
|
||||
$this->lexer->moveNext();
|
||||
} while ($this->lexer->token);
|
||||
} while (null !== $this->lexer->token['type']);
|
||||
|
||||
return $domain;
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@ class LocalPart extends Parser
|
||||
$closingQuote = false;
|
||||
$openedParenthesis = 0;
|
||||
|
||||
while ($this->lexer->token['type'] !== EmailLexer::S_AT && $this->lexer->token) {
|
||||
if ($this->lexer->token['type'] === EmailLexer::S_DOT && !$this->lexer->getPrevious()) {
|
||||
while ($this->lexer->token['type'] !== EmailLexer::S_AT && null !== $this->lexer->token['type']) {
|
||||
if ($this->lexer->token['type'] === EmailLexer::S_DOT && null === $this->lexer->getPrevious()['type']) {
|
||||
throw new DotAtStart();
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ class LocalPart extends Parser
|
||||
|
||||
$this->lexer->moveNext();
|
||||
|
||||
while ($this->lexer->token['type'] !== EmailLexer::S_DQUOTE && $this->lexer->token) {
|
||||
while ($this->lexer->token['type'] !== EmailLexer::S_DQUOTE && null !== $this->lexer->token['type']) {
|
||||
$parseAgain = false;
|
||||
if (isset($special[$this->lexer->token['type']]) && $setSpecialsWarning) {
|
||||
$this->warnings[CFWSWithFWS::CODE] = new CFWSWithFWS();
|
||||
|
||||
3
vendor/egulias/email-validator/composer.json
vendored
3
vendor/egulias/email-validator/composer.json
vendored
@@ -10,7 +10,7 @@
|
||||
],
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.0.x-dev"
|
||||
"dev-master": "2.1.x-dev"
|
||||
}
|
||||
},
|
||||
"repositories": [
|
||||
@@ -26,6 +26,7 @@
|
||||
"require-dev" : {
|
||||
"satooshi/php-coveralls": "^1.0.1",
|
||||
"phpunit/phpunit": "^4.8.35||^5.7||^6.0",
|
||||
"symfony/phpunit-bridge": "^4.4@dev",
|
||||
"dominicsayers/isemail": "dev-master"
|
||||
},
|
||||
"suggest": {
|
||||
|
||||
11
vendor/egulias/email-validator/phpunit.xml.dist
vendored
11
vendor/egulias/email-validator/phpunit.xml.dist
vendored
@@ -8,7 +8,6 @@
|
||||
convertWarningsToExceptions="true"
|
||||
processIsolation="false"
|
||||
stopOnFailure="false"
|
||||
syntaxCheck="false"
|
||||
bootstrap="vendor/autoload.php"
|
||||
>
|
||||
<testsuites>
|
||||
@@ -19,8 +18,12 @@
|
||||
</testsuites>
|
||||
|
||||
<filter>
|
||||
<blacklist>
|
||||
<directory>./vendor</directory>
|
||||
</blacklist>
|
||||
<whitelist>
|
||||
<directory>./EmailValidator/</directory>
|
||||
</whitelist>
|
||||
</filter>
|
||||
|
||||
<listeners>
|
||||
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
|
||||
</listeners>
|
||||
</phpunit>
|
||||
|
||||
Reference in New Issue
Block a user