Code Duplication    Length = 10-16 lines in 2 locations

core/process/quarrys/rocketmap.php 2 locations

@@ 322-331 (lines=10) @@
319
    return $reqRanking;
320
}
321
322
function req_trainer_levels_for_team($teamid)
323
{
324
    global $config;
325
    $reqLevels = "SELECT level, count(level) AS count FROM trainer WHERE team = '" . $teamid . "'";
326
    if (!empty($config->system->trainer_blacklist)) {
327
        $reqLevels .= " AND name NOT IN ('" . implode("','", $config->system->trainer_blacklist) . "')";
328
    }
329
    $reqLevels .= " GROUP BY level";
330
    return $reqLevels;
331
}
332
333
// Raids
334
########
@@ 377-392 (lines=16) @@
374
// Nests
375
########
376
377
function req_map_data()
378
{
379
    global $config;
380
    $pokemon_exclude_sql = "";
381
    if (!empty($config->system->nest_exclude_pokemon)) {
382
        $pokemon_exclude_sql = "AND p.pokemon_id NOT IN (" . implode(",", $config->system->nest_exclude_pokemon) . ")";
383
    }
384
    return "SELECT p.pokemon_id, max(p.latitude) AS latitude, max(p.longitude) AS longitude, count(p.pokemon_id) AS total_pokemon, s.latest_seen, (LENGTH(s.kind) - LENGTH( REPLACE ( kind, \"s\", \"\") )) * 900 AS duration
385
          FROM pokemon p 
386
          INNER JOIN spawnpoint s ON (p.spawnpoint_id = s.id) 
387
          WHERE p.disappear_time > UTC_TIMESTAMP() - INTERVAL 24 HOUR 
388
          " . $pokemon_exclude_sql . " 
389
          GROUP BY p.spawnpoint_id, p.pokemon_id 
390
          HAVING COUNT(p.pokemon_id) >= 6 
391
          ORDER BY p.pokemon_id";
392
}