Fix types issues

This commit is contained in:
Bastien Wermeille
2022-12-18 22:43:52 +01:00
parent f9e4bc5835
commit 7771e2bf2c
18 changed files with 116 additions and 113 deletions
+2 -2
View File
@@ -21,8 +21,8 @@ class IDRightPart extends DomainPart
EmailLexer::S_LOWERTHAN => true,
];
if (isset($invalidDomainTokens[$this->lexer->token?->type])) {
return new InvalidEmail(new ExpectingATEXT('Invalid token in domain: ' . $this->lexer->token?->value), $this->lexer->token?->value);
if (isset($invalidDomainTokens[$this->lexer->current->type])) {
return new InvalidEmail(new ExpectingATEXT('Invalid token in domain: ' . $this->lexer->current->value), $this->lexer->current->value);
}
return new ValidEmail();
}