Code Duplication    Length = 8-10 lines in 2 locations

src/Parsers/EventPage.php 1 location

@@ 92-99 (lines=8) @@
89
        $fieldMap = Result::getLabelMaps();
90
        if ($fields->count() > 0) {
91
            $colNum = 0;
92
            foreach ($fields as $field) {
93
                $fieldName = $field->nodeValue;
94
                $labelFind = array_search($fieldName, $fieldMap);
95
                if ($labelFind) {
96
                    $return[$colNum] = $labelFind;
97
                }
98
                $colNum++;
99
            }
100
        }
101
102
        return $return;

src/Parsers/ResultPage.php 1 location

@@ 136-145 (lines=10) @@
133
134
        $fieldMap = Split::getLabelMaps();
135
        $colNum   = 0;
136
        foreach ($row->childNodes as $node) {
137
            if ($node instanceof DOMElement) {
138
                $fieldName = trim($node->nodeValue);
139
                $labelFind = array_search($fieldName, $fieldMap);
140
                if ($labelFind) {
141
                    $return[$colNum] = $labelFind;
142
                }
143
                $colNum++;
144
            }
145
        }
146
147
        return $return;
148
    }