Code Duplication    Length = 15-16 lines in 2 locations

core/process/queries/QueryManagerMysqlRocketmap.php 1 location

@@ 210-225 (lines=16) @@
207
		return $points;
208
	}
209
210
	public function getPokemonGraph($pokemon_id) {
211
		$req = "SELECT COUNT(*) AS total,
212
					HOUR(CONVERT_TZ(disappear_time, '+00:00', '".self::$time_offset."')) AS disappear_hour
213
					FROM (SELECT disappear_time FROM pokemon WHERE pokemon_id = '".$pokemon_id."' ORDER BY disappear_time LIMIT 100000) AS pokemonFiltered
214
					GROUP BY disappear_hour
215
					ORDER BY disappear_hour";
216
		$result = $this->mysqli->query($req);
217
		$array = array_fill(0, 24, 0);
218
		while ($result && $data = $result->fetch_object()) {
219
			$array[$data->disappear_hour] = $data->total;
220
		}
221
		// shift array because AM/PM starts at 1AM not 0:00
222
		$array[] = $array[0];
223
		array_shift($array);
224
		return $array;
225
	}
226
227
	public function getPokemonLive($pokemon_id, $ivMin, $ivMax, $inmap_pokemons) {
228
		$inmap_pkms_filter = "";

core/process/queries/QueryManagerMysqlMonocleAlternate.php 1 location

@@ 215-229 (lines=15) @@
212
		return $points;
213
	}
214
215
	public function getPokemonGraph($pokemon_id) {
216
		$req = "SELECT COUNT(*) AS total, HOUR(disappear_time) AS disappear_hour
217
					FROM (SELECT FROM_UNIXTIME(expire_timestamp) as disappear_time FROM sightings WHERE pokemon_id = '".$pokemon_id."' ORDER BY disappear_time LIMIT 100000) AS pokemonFiltered
218
				GROUP BY disappear_hour
219
				ORDER BY disappear_hour";
220
		$result = $this->mysqli->query($req);
221
		$array = array_fill(0, 24, 0);
222
		while ($result && $data = $result->fetch_object()) {
223
			$array[$data->disappear_hour] = $data->total;
224
		}
225
		// shift array because AM/PM starts at 1AM not 0:00
226
		$array[] = $array[0];
227
		array_shift($array);
228
		return $array;
229
	}
230
231
	public function getPokemonLive($pokemon_id, $ivMin, $ivMax, $inmap_pokemons) {
232
		$inmap_pkms_filter = "";