Code Duplication    Length = 12-13 lines in 2 locations

src/JacocoReport.php 1 location

@@ 56-67 (lines=12) @@
53
        }
54
    }
55
56
    protected function findFile($reader, $currentNamespace, $currentFile): string
57
    {
58
        if ((
59
            $reader->name === "sourcefile" &&
60
            $reader->nodeType == XMLReader::ELEMENT
61
        )) {
62
            $currentFile = $currentNamespace . '/' . $reader->getAttribute('name');
63
            $this->coveredLines[$currentFile] = [];
64
        }
65
66
        return $currentFile;
67
    }
68
69
    protected function findNamespace($reader, $currentNamespace)
70
    {

src/PhpMdLoader.php 1 location

@@ 110-122 (lines=13) @@
107
     * @param string $currentFile
108
     * @return string the currentFileName
109
     */
110
    protected function checkForNewFile(XMLReader $reader, $currentFile)
111
    {
112
        if ((
113
            $reader->name === 'file' &&
114
            $reader->nodeType == XMLReader::ELEMENT
115
        )
116
        ) {
117
            $currentFile = $reader->getAttribute('name');
118
            $this->errors[$currentFile] = [];
119
            return $currentFile;
120
        }
121
        return $currentFile;
122
    }
123
124
    /**
125
     * {@inheritdoc}