Code Duplication    Length = 12-16 lines in 2 locations

core/process/queries/QueryManagerMysqlRocketmap.php 2 locations

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