Code Duplication    Length = 3-3 lines in 2 locations

controller/RestController.php 2 locations

@@ 807-809 (lines=3) @@
804
                        }
805
                    }
806
                    // if the main concept scheme was not found, set 'top' to the first 'tops' (sorted alphabetically on the URIs)
807
                    if (! isset($results[$uri]['top'])) {
808
                        $results[$uri]['top'] = $results[$uri]['tops'][0];
809
                    }
810
                } else {
811
                    // no main concept scheme set on the vocab, take the first value of 'tops' (sorted alphabetically)
812
                    $results[$uri]['top'] = $results[$uri]['tops'][0];
@@ 831-833 (lines=3) @@
828
            foreach ($topconcepts as $top) {
829
                if (!isset($results[$top['uri']])) {
830
                    $results[$top['uri']] = array('uri' => $top['uri'], 'top'=>$top['topConceptOf'], 'tops'=>array($top['topConceptOf']), 'prefLabel' => $top['label'], 'hasChildren' => $top['hasChildren']);
831
                    if (isset($top['notation'])) {
832
                        $results[$top['uri']]['notation'] = $top['notation'];
833
                    }
834
835
                }
836
            }