Code Duplication    Length = 3-3 lines in 2 locations

controller/RestController.php 2 locations

@@ 918-920 (lines=3) @@
915
                        }
916
                    }
917
                    // if the main concept scheme was not found, set 'top' to the first 'tops' (sorted alphabetically on the URIs)
918
                    if (! isset($results[$uri]['top'])) {
919
                        $results[$uri]['top'] = $results[$uri]['tops'][0];
920
                    }
921
                } else {
922
                    // no main concept scheme set on the vocab, take the first value of 'tops' (sorted alphabetically)
923
                    $results[$uri]['top'] = $results[$uri]['tops'][0];
@@ 942-944 (lines=3) @@
939
            foreach ($topconcepts as $top) {
940
                if (!isset($results[$top['uri']])) {
941
                    $results[$top['uri']] = array('uri' => $top['uri'], 'top'=>$top['topConceptOf'], 'tops'=>array($top['topConceptOf']), 'prefLabel' => $top['label'], 'hasChildren' => $top['hasChildren']);
942
                    if (isset($top['notation'])) {
943
                        $results[$top['uri']]['notation'] = $top['notation'];
944
                    }
945
946
                }
947
            }