Code Duplication    Length = 3-3 lines in 3 locations

model/sparql/GenericSparql.php 3 locations

@@ 1831-1833 (lines=3) @@
1828
        foreach ($result as $row) {
1829
            if (isset($row->top) && isset($row->label)) {
1830
                $label = $row->label->getValue();
1831
                if ($row->label->getLang() && $row->label->getLang() !== $lang && strpos($row->label->getLang(), $lang . "-") !== 0) {
1832
                    $label .= ' (' . $row->label->getLang() . ')';
1833
                }
1834
                $top = array('uri' => $row->top->getUri(), 'topConceptOf' => $row->topuri->getUri(), 'label' => $label, 'hasChildren' => filter_var($row->children->getValue(), FILTER_VALIDATE_BOOLEAN));
1835
                if (isset($row->notation)) {
1836
                    $top['notation'] = $row->notation->getValue();
@@ 1938-1940 (lines=3) @@
1935
                $label = null;
1936
                if (isset($row->childlabel)) {
1937
                    $label = $row->childlabel->getValue();
1938
                    if ($row->childlabel->getLang() !== $lang && strpos($row->childlabel->getLang(), $lang . "-") !== 0) {
1939
                        $label .= " (" . $row->childlabel->getLang() . ")";
1940
                    }
1941
1942
                }
1943
@@ 1960-1962 (lines=3) @@
1957
            }
1958
            if (isset($row->label)) {
1959
                $preflabel = $row->label->getValue();
1960
                if ($row->label->getLang() && $row->label->getLang() !== $lang && strpos($row->label->getLang(), $lang . "-") !== 0) {
1961
                    $preflabel .= ' (' . $row->label->getLang() . ')';
1962
                }
1963
1964
                $ret[$uri]['prefLabel'] = $preflabel;
1965
            }