Code Duplication    Length = 11-13 lines in 3 locations

src/JacocoReport.php 1 location

@@ 56-67 (lines=12) @@
53
        }
54
    }
55
56
    protected function findFile($reader, $currentNamespace, $currentFile)
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/CloverLoader.php 1 location

@@ 77-87 (lines=11) @@
74
        return 'Parses text output in clover (xml) format';
75
    }
76
77
    protected function checkForNewFiles($reader, $currentFile)
78
    {
79
        if ((
80
            $reader->name === "file" &&
81
            $reader->nodeType == XMLReader::ELEMENT
82
        )) {
83
            $currentFile = $reader->getAttribute('name');
84
            $this->coveredLines[$currentFile] = [];
85
        }
86
        return $currentFile;
87
    }
88
89
    /**
90
     * @param $reader

src/PhpMdLoader.php 1 location

@@ 103-115 (lines=13) @@
100
     * @param string $currentFile
101
     * @return string the currentFileName
102
     */
103
    protected function checkForNewFile(XMLReader $reader, $currentFile)
104
    {
105
        if ((
106
            $reader->name === 'file' &&
107
            $reader->nodeType == XMLReader::ELEMENT
108
        )
109
        ) {
110
            $currentFile = $reader->getAttribute('name');
111
            $this->errors[$currentFile] = [];
112
            return $currentFile;
113
        }
114
        return $currentFile;
115
    }
116
117
    /**
118
     * {@inheritdoc}