Code Duplication    Length = 3-3 lines in 2 locations

controller/RestController.php 2 locations

@@ 878-880 (lines=3) @@
875
                        }
876
                    }
877
                    // if the main concept scheme was not found, set 'top' to the first 'tops' (sorted alphabetically on the URIs)
878
                    if (! isset($results[$uri]['top'])) {
879
                        $results[$uri]['top'] = $results[$uri]['tops'][0];
880
                    }
881
                } else {
882
                    // no main concept scheme set on the vocab, take the first value of 'tops' (sorted alphabetically)
883
                    $results[$uri]['top'] = $results[$uri]['tops'][0];
@@ 902-904 (lines=3) @@
899
            foreach ($topconcepts as $top) {
900
                if (!isset($results[$top['uri']])) {
901
                    $results[$top['uri']] = array('uri' => $top['uri'], 'top'=>$top['topConceptOf'], 'tops'=>array($top['topConceptOf']), 'prefLabel' => $top['label'], 'hasChildren' => $top['hasChildren']);
902
                    if (isset($top['notation'])) {
903
                        $results[$top['uri']]['notation'] = $top['notation'];
904
                    }
905
906
                }
907
            }