Code Duplication    Length = 3-3 lines in 2 locations

model/sparql/GenericSparql.php 2 locations

@@ 1719-1721 (lines=3) @@
1716
        foreach ($result as $row) {
1717
            if (isset($row->top) && isset($row->label)) {
1718
                $label = $row->label->getValue();
1719
                if ($row->label->getLang() && $row->label->getLang() !== $lang && strpos($row->label->getLang(), $lang . "-") !== 0) {
1720
                    $label .= ' (' . $row->label->getLang() . ')';
1721
                }
1722
                $top = array('uri' => $row->top->getUri(), 'topConceptOf' => $row->topuri->getUri(), 'label' => $label, 'hasChildren' => filter_var($row->children->getValue(), FILTER_VALIDATE_BOOLEAN));
1723
                if (isset($row->notation)) {
1724
                    $top['notation'] = $row->notation->getValue();
@@ 1843-1845 (lines=3) @@
1840
            }
1841
            if (isset($row->label)) {
1842
                $preflabel = $row->label->getValue();
1843
                if ($row->label->getLang() && $row->label->getLang() !== $lang && strpos($row->label->getLang(), $lang . "-") !== 0) {
1844
                    $preflabel .= ' (' . $row->label->getLang() . ')';
1845
                }
1846
1847
                $ret[$uri]['prefLabel'] = $preflabel;
1848
            }