Code Duplication    Length = 3-3 lines in 2 locations

controller/RestController.php 2 locations

@@ 927-929 (lines=3) @@
924
                        }
925
                    }
926
                    // if the main concept scheme was not found, set 'top' to the first 'tops' (sorted alphabetically on the URIs)
927
                    if (! isset($results[$uri]['top'])) {
928
                        $results[$uri]['top'] = $results[$uri]['tops'][0];
929
                    }
930
                } else {
931
                    // no main concept scheme set on the vocab, take the first value of 'tops' (sorted alphabetically)
932
                    $results[$uri]['top'] = $results[$uri]['tops'][0];
@@ 951-953 (lines=3) @@
948
            foreach ($topconcepts as $top) {
949
                if (!isset($results[$top['uri']])) {
950
                    $results[$top['uri']] = array('uri' => $top['uri'], 'top'=>$top['topConceptOf'], 'tops'=>array($top['topConceptOf']), 'prefLabel' => $top['label'], 'hasChildren' => $top['hasChildren']);
951
                    if (isset($top['notation'])) {
952
                        $results[$top['uri']]['notation'] = $top['notation'];
953
                    }
954
955
                }
956
            }