Code Duplication    Length = 7-8 lines in 2 locations

model/sparql/GenericSparql.php 2 locations

@@ 1504-1511 (lines=8) @@
1501
            // existing concept but no children
1502
1503
            $label = null;
1504
            if (isset($row->label)) {
1505
                if ($row->label->getLang() == $lang) {
1506
                    $label = $row->label->getValue();
1507
                } else {
1508
                    $label = $row->label->getValue() . " (" . $row->label->getLang() . ")";
1509
                }
1510
1511
            }
1512
            $childArray = array(
1513
                'uri' => $row->child->getUri(),
1514
                'prefLabel' => $label,
@@ 1674-1680 (lines=7) @@
1671
                }
1672
1673
                $label = null;
1674
                if (isset($row->childlabel)) {
1675
                    $label = $row->childlabel->getValue();
1676
                    if ($row->childlabel->getLang() !== $lang) {
1677
                        $label .= " (" . $row->childlabel->getLang() . ")";
1678
                    }
1679
1680
                }
1681
1682
                $childArr = array(
1683
                    'uri' => $row->children->getUri(),