x Sorry, these patches are not available anymore due to data migration. Please run a fresh inspection.

Code Duplication    Length = 10-10 lines in 2 locations

core/process/queries/QueryManagerMysqlMonocleAlternate.php 1 location

@@ 587-596 (lines=10) @@
584
        if (0 != $team) {
585
            $where .= ('' == $where ? ' HAVING' : ' AND').' team = '.$team;
586
        }
587
        switch ($rankingNumber) {
588
            case 1:
589
                $order = ' ORDER BY active DESC, level DESC';
590
                break;
591
            case 2:
592
                $order = ' ORDER BY maxCp DESC, level DESC';
593
                break;
594
            default:
595
                $order = ' ORDER BY level DESC, active DESC';
596
        }
597
        $order .= ', last_seen DESC, name ';
598
        $limit = ' LIMIT '.($page * 10).',10 ';
599
        $req = 'SELECT gd.owner_name AS name, MAX(owner_level) AS level, MAX(cp) AS maxCp, MAX(active) AS active, MAX(team) AS team, FROM_UNIXTIME(MAX(last_modified)) as last_seen

core/process/queries/QueryManagerPostgresqlMonocleAlternate.php 1 location

@@ 588-597 (lines=10) @@
585
        if (0 != $team) {
586
            $where .= ('' == $where ? ' HAVING' : ' AND').' team = '.$team;
587
        }
588
        switch ($rankingNumber) {
589
            case 1:
590
                $order = ' ORDER BY active DESC, level DESC';
591
                break;
592
            case 2:
593
                $order = ' ORDER BY maxCp DESC, level DESC';
594
                break;
595
            default:
596
                $order = ' ORDER BY level DESC, active DESC';
597
        }
598
        $order .= ', last_seen DESC, name ';
599
        $limit = ' LIMIT 10 OFFSET '.($page * 10);
600
        $req = 'SELECT gd.owner_name AS name, MAX(owner_level) AS level, MAX(cp) AS maxCp, MAX(active) AS active, MAX(team) AS team, TO_TIMESTAMP(MAX(last_modified)) as last_seen