Code Duplication    Length = 7-8 lines in 2 locations

model/sparql/GenericSparql.php 2 locations

@@ 1554-1561 (lines=8) @@
1551
            // existing concept but no children
1552
1553
            $label = null;
1554
            if (isset($row->label)) {
1555
                if ($row->label->getLang() == $lang) {
1556
                    $label = $row->label->getValue();
1557
                } else {
1558
                    $label = $row->label->getValue() . " (" . $row->label->getLang() . ")";
1559
                }
1560
1561
            }
1562
            $childArray = array(
1563
                'uri' => $row->child->getUri(),
1564
                'prefLabel' => $label,
@@ 1720-1726 (lines=7) @@
1717
                }
1718
1719
                $label = null;
1720
                if (isset($row->childlabel)) {
1721
                    $label = $row->childlabel->getValue();
1722
                    if ($row->childlabel->getLang() !== $lang) {
1723
                        $label .= " (" . $row->childlabel->getLang() . ")";
1724
                    }
1725
1726
                }
1727
1728
                $childArr = array(
1729
                    'uri' => $row->children->getUri(),