Code Duplication    Length = 3-3 lines in 2 locations

model/sparql/GenericSparql.php 2 locations

@@ 1775-1777 (lines=3) @@
1772
        foreach ($result as $row) {
1773
            if (isset($row->top) && isset($row->label)) {
1774
                $label = $row->label->getValue();
1775
                if ($row->label->getLang() && $row->label->getLang() !== $lang && strpos($row->label->getLang(), $lang . "-") !== 0) {
1776
                    $label .= ' (' . $row->label->getLang() . ')';
1777
                }
1778
                $top = array('uri' => $row->top->getUri(), 'topConceptOf' => $row->topuri->getUri(), 'label' => $label, 'hasChildren' => filter_var($row->children->getValue(), FILTER_VALIDATE_BOOLEAN));
1779
                if (isset($row->notation)) {
1780
                    $top['notation'] = $row->notation->getValue();
@@ 1905-1907 (lines=3) @@
1902
            }
1903
            if (isset($row->label)) {
1904
                $preflabel = $row->label->getValue();
1905
                if ($row->label->getLang() && $row->label->getLang() !== $lang && strpos($row->label->getLang(), $lang . "-") !== 0) {
1906
                    $preflabel .= ' (' . $row->label->getLang() . ')';
1907
                }
1908
1909
                $ret[$uri]['prefLabel'] = $preflabel;
1910
            }