Code Duplication    Length = 11-12 lines in 2 locations

src/EmailParser.php 2 locations

@@ 86-96 (lines=11) @@
83
        return new ValidEmail();
84
    }
85
86
    private function processLocalPart() : Result
87
    {
88
        $this->lexer->startRecording();
89
        $this->localPartParser = new LocalPart($this->lexer);
90
        $localPartResult = $this->localPartParser->parse();
91
        $this->lexer->stopRecording();
92
        $this->localPart = rtrim($this->lexer->getAccumulatedValues(), '@');
93
        $this->warnings = array_merge($this->localPartParser->getWarnings(), $this->warnings);
94
95
        return $localPartResult;
96
    }
97
98
    private function processDomainPart() : Result
99
    {
@@ 98-109 (lines=12) @@
95
        return $localPartResult;
96
    }
97
98
    private function processDomainPart() : Result
99
    {
100
        $this->lexer->clearRecorded();
101
        $this->lexer->startRecording();
102
        $this->domainPartParser = new DomainPart($this->lexer);
103
        $domainPartResult = $this->domainPartParser->parse();
104
        $this->lexer->stopRecording();
105
        $this->domainPart = $this->lexer->getAccumulatedValues();
106
        $this->warnings = array_merge($this->domainPartParser->getWarnings(), $this->warnings);
107
        
108
        return $domainPartResult;
109
    }
110
111
    /**
112
     * @return Warning\Warning[]