Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Tests | 3 |
CRAP Score | 2.0625 |
Changes | 0 |
1 | <?php |
||
22 | 2 | public function endOfLoopValidations(EmailLexer $lexer): Result |
|
23 | { |
||
24 | //test for end of string |
||
25 | 2 | if (!$lexer->isNextToken(EmailLexer::S_DOT)) { |
|
26 | return new InvalidEmail(new ExpectingATEXT('DOT not found near CLOSEPARENTHESIS'), $lexer->current->value); |
||
27 | } |
||
28 | //add warning |
||
29 | //Address is valid within the message but cannot be used unmodified for the envelope |
||
30 | 2 | return new ValidEmail(); |
|
31 | } |
||
38 |