Code Duplication    Length = 22-22 lines in 2 locations

core/process/queries/QueryManagerMysqlMAD.php 1 location

@@ 576-597 (lines=22) @@
573
    // Raids
574
    ///////////
575
576
    public function getAllRaids($page)
577
    {
578
        $req = "SELECT raid.gym_id, raid.level, raid.pokemon_id, raid.cp, raid.move_1, raid.move_2,
579
				CONVERT_TZ(raid.spawn, '+00:00', '".self::$time_offset."') AS spawn,
580
				CONVERT_TZ(raid.start, '+00:00', '".self::$time_offset."') AS start,
581
				CONVERT_TZ(raid.end, '+00:00', '".self::$time_offset."') AS end,
582
				CONVERT_TZ(raid.last_scanned, '+00:00', '".self::$time_offset."') AS last_scanned,
583
				gymdetails.name, gym.latitude, gym.longitude
584
				FROM raid
585
				JOIN gymdetails ON gymdetails.gym_id = raid.gym_id
586
				JOIN gym ON gym.gym_id = raid.gym_id
587
				WHERE raid.end > UTC_TIMESTAMP()
588
				ORDER BY raid.level DESC, raid.start
589
				LIMIT ".($page * 10).",10";
590
        $result = $this->mysqli->query($req);
591
        $raids = array();
592
        while ($data = $result->fetch_object()) {
593
            $raids[] = $data;
594
        }
595
596
        return $raids;
597
    }
598
599
    //////////////
600
    // Trainers

core/process/queries/QueryManagerMysqlRocketmap.php 1 location

@@ 594-615 (lines=22) @@
591
    // Raids
592
    ///////////
593
594
    public function getAllRaids($page)
595
    {
596
        $req = "SELECT raid.gym_id, raid.level, raid.pokemon_id, raid.cp, raid.move_1, raid.move_2,
597
				CONVERT_TZ(raid.spawn, '+00:00', '".self::$time_offset."') AS spawn,
598
				CONVERT_TZ(raid.start, '+00:00', '".self::$time_offset."') AS start,
599
				CONVERT_TZ(raid.end, '+00:00', '".self::$time_offset."') AS end,
600
				CONVERT_TZ(raid.last_scanned, '+00:00', '".self::$time_offset."') AS last_scanned,
601
				gymdetails.name, gym.latitude, gym.longitude
602
				FROM raid
603
				JOIN gymdetails ON gymdetails.gym_id = raid.gym_id
604
				JOIN gym ON gym.gym_id = raid.gym_id
605
				WHERE raid.end > UTC_TIMESTAMP()
606
				ORDER BY raid.level DESC, raid.start
607
				LIMIT ".($page * 10).",10";
608
        $result = $this->mysqli->query($req);
609
        $raids = array();
610
        while ($data = $result->fetch_object()) {
611
            $raids[] = $data;
612
        }
613
614
        return $raids;
615
    }
616
617
    //////////////
618
    // Trainers