Code Duplication    Length = 12-16 lines in 2 locations

core/process/queries/QueryManagerMysqlRocketmap.php 2 locations

@@ 143-158 (lines=16) @@
140
        return $data;
141
    }
142
143
    public function getRecentMythic($mythic_pokemons)
144
    {
145
        $req = "SELECT DISTINCT pokemon_id, encounter_id, disappear_time, last_modified,
146
				CONVERT_TZ(disappear_time, '+00:00', '".self::$time_offset."') AS disappear_time_real,
147
				latitude, longitude, cp, individual_attack, individual_defense, individual_stamina
148
				FROM pokemon
149
				WHERE pokemon_id IN (".implode(',', $mythic_pokemons).')
150
				ORDER BY last_modified DESC
151
				LIMIT 0,12';
152
        $result = $this->mysqli->query($req);
153
        $data = array();
154
        if ($result->num_rows > 0) {
155
            while ($row = $result->fetch_object()) {
156
                $data[] = $row;
157
            }
158
        }
159
160
        return $data;
161
    }
@@ 547-558 (lines=12) @@
544
        return array('last_page' => $last_page, 'data' => $history);
545
    }
546
547
    private function getHistoryForGymPokemon($pkm_uids)
548
    {
549
        $req = "SELECT DISTINCT pokemon_uid, pokemon_id, cp, trainer_name
550
				FROM gympokemon
551
				WHERE pokemon_uid IN ('".implode("','", $pkm_uids)."')
552
				ORDER BY FIND_IN_SET(pokemon_uid, '".implode(',', $pkm_uids)."')";
553
        $result = $this->mysqli->query($req);
554
        $pokemons = array();
555
        while ($data = $result->fetch_object()) {
556
            $pokemons[$data->pokemon_uid] = $data;
557
        }
558
559
        return $pokemons;
560
    }
561