Code Duplication    Length = 7-8 lines in 2 locations

model/sparql/GenericSparql.php 2 locations

@@ 1569-1576 (lines=8) @@
1566
            // existing concept but no children
1567
1568
            $label = null;
1569
            if (isset($row->label)) {
1570
                if ($row->label->getLang() == $lang) {
1571
                    $label = $row->label->getValue();
1572
                } else {
1573
                    $label = $row->label->getValue() . " (" . $row->label->getLang() . ")";
1574
                }
1575
1576
            }
1577
            $childArray = array(
1578
                'uri' => $row->child->getUri(),
1579
                'prefLabel' => $label,
@@ 1735-1741 (lines=7) @@
1732
                }
1733
1734
                $label = null;
1735
                if (isset($row->childlabel)) {
1736
                    $label = $row->childlabel->getValue();
1737
                    if ($row->childlabel->getLang() !== $lang) {
1738
                        $label .= " (" . $row->childlabel->getLang() . ")";
1739
                    }
1740
1741
                }
1742
1743
                $childArr = array(
1744
                    'uri' => $row->children->getUri(),