Code Duplication    Length = 9-11 lines in 2 locations

src/Command/Diff/Compare/FullDiffList.php 2 locations

@@ 174-184 (lines=11) @@
171
     * @param  string $line
172
     * @return bool
173
     */
174
    private function isHeaderLine(string $line): bool
175
    {
176
        $matches = [];
177
        if (preg_match('#^diff --git [a|b|c|i|w|o]/(.*) [a|b|c|i|w|o]/(.*)#', $line, $matches)) {
178
            $this->appendCollectedFileAndChanges();
179
            $this->currentOperation = File::OP_MODIFIED;
180
            $this->currentFileName  = $matches[2];
181
            return true;
182
        }
183
        return false;
184
    }
185
186
    /**
187
     * Is the given line a diff header similarity line.
@@ 229-237 (lines=9) @@
226
     * @param  string $line
227
     * @return bool
228
     */
229
    private function isHeaderIndexLine(string $line): bool
230
    {
231
        $matches = [];
232
        if (preg_match('#^index\s([a-z0-9]+)\.\.([a-z0-9]+)(.*)$#i', $line, $matches)) {
233
            $this->currentFile = new File($this->currentFileName, $this->currentOperation);
234
            return true;
235
        }
236
        return false;
237
    }
238
239
    /**
240
     * Is the given line a diff header format line.