Code Duplication    Length = 5-5 lines in 2 locations

controller/RestController.php 2 locations

@@ 452-456 (lines=5) @@
449
        }
450
451
        // case 3: exact match on alternate label
452
        foreach ($results as $res) {
453
            if (isset($res['altLabel']) && $res['altLabel'] == $label) {
454
                $hits[] = $res;
455
            }
456
        }
457
        if (sizeof($hits) > 0) return $hits;
458
459
@@ 461-465 (lines=5) @@
458
459
460
        // case 4: case-insensitive match on alternate label
461
        foreach ($results as $res) {
462
            if (isset($res['altLabel']) && strtolower($res['altLabel']) == strtolower($label)) {
463
                $hits[] = $res;
464
            }
465
        }
466
        if (sizeof($hits) > 0) return $hits;
467
468
        return $hits;