Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Lines | 3 |
Ratio | 37.5 % |
Changes | 0 |
1 | <?php |
||
21 | public function endOfLoopValidations(EmailLexer $lexer) : Result |
||
22 | { |
||
23 | View Code Duplication | if (!$lexer->isNextToken(EmailLexer::S_AT)) { |
|
|
|||
24 | return new InvalidEmail(new ExpectingATEXT('ATEX is not expected after closing comments'), $lexer->token['value']); |
||
25 | } |
||
26 | $this->warnings[CFWSNearAt::CODE] = new CFWSNearAt(); |
||
27 | return new ValidEmail(); |
||
28 | } |
||
29 | |||
34 | } |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.