Code Duplication    Length = 10-10 lines in 2 locations

core/process/queries/QueryManagerMysqlRocketmap.php 2 locations

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