Code Duplication    Length = 10-10 lines in 2 locations

core/process/queries/QueryManagerMysqlRocketmap.php 2 locations

@@ 368-377 (lines=10) @@
365
		if (isset($team) && $team != '') {
366
			$where .= ($where == "" ? " WHERE" : " AND")." team_id = ".$team;
367
		}
368
		switch ($ranking) {
369
			case 1:
370
				$order = " ORDER BY name, last_modified DESC";
371
				break;
372
			case 2:
373
				$order = " ORDER BY total_cp DESC, last_modified DESC";
374
				break;
375
			default:
376
				$order = " ORDER BY last_modified DESC, name";
377
		}
378
379
		$limit = " LIMIT ".($page * 10).",10";
380
@@ 520-529 (lines=10) @@
517
		if ($team != 0) {
518
			$where .= ($where == "" ? " HAVING" : " AND")." team = ".$team;
519
		}
520
		switch ($ranking) {
521
			case 1:
522
				$order = " ORDER BY active DESC, level DESC";
523
				break;
524
			case 2:
525
				$order = " ORDER BY maxCp DESC, level DESC";
526
				break;
527
			default:
528
				$order = " ORDER BY level DESC, active DESC";
529
		}
530
		$order .= ", last_seen DESC, name ";
531
		$limit = " LIMIT ".($page * 10).",10 ";
532
		$req = "SELECT trainer.*, COUNT(actives_pokemons.trainer_name) AS active, max(actives_pokemons.cp) AS maxCp