@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | * |
| 20 | 20 | * @return array Sorted list of "accept" options |
| 21 | 21 | */ |
| 22 | -$sortAccept = function ($header) { |
|
| 22 | +$sortAccept = function($header) { |
|
| 23 | 23 | $matches = array(); |
| 24 | 24 | foreach (explode(',', $header) as $option) { |
| 25 | 25 | $option = array_map('trim', explode(';', $option)); |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | * |
| 53 | 53 | * @return string|NULL a matched option, or NULL if no match |
| 54 | 54 | */ |
| 55 | -$matchAccept = function ($header, $supported) use ($sortAccept) { |
|
| 55 | +$matchAccept = function($header, $supported) use ($sortAccept) { |
|
| 56 | 56 | $matches = $sortAccept($header); |
| 57 | 57 | foreach ($matches as $key => $q) { |
| 58 | 58 | if (isset($supported[$key])) { |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | * |
| 84 | 84 | * @return string The negotiated language result or the supplied default. |
| 85 | 85 | */ |
| 86 | -$negotiateLanguage = function ($supported, $default = 'en-US') use ($matchAccept) { |
|
| 86 | +$negotiateLanguage = function($supported, $default = 'en-US') use ($matchAccept) { |
|
| 87 | 87 | $supp = array(); |
| 88 | 88 | foreach ($supported as $lang => $isSupported) { |
| 89 | 89 | if ($isSupported) { |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | <script type="text/javascript"> |
| 69 | 69 | <?= |
| 70 | 70 | $gymName = ""; |
| 71 | -if (isset($_GET['name']) && $_GET['name']!="") { |
|
| 71 | +if (isset($_GET['name']) && $_GET['name'] != "") { |
|
| 72 | 72 | $gymName = htmlentities($_GET['name']); |
| 73 | 73 | } |
| 74 | 74 | ?> |
@@ -317,17 +317,17 @@ |
||
| 317 | 317 | <p class="pkmn-name"> |
| 318 | 318 | <?php |
| 319 | 319 | if (isset($obj->candies)) { |
| 320 | - echo $obj->candies . ' ' . $locales->POKEMON_CANDIES; |
|
| 320 | + echo $obj->candies.' '.$locales->POKEMON_CANDIES; |
|
| 321 | 321 | } else { |
| 322 | - echo '? ' . $locales->POKEMON_CANDIES; |
|
| 322 | + echo '? '.$locales->POKEMON_CANDIES; |
|
| 323 | 323 | } |
| 324 | 324 | |
| 325 | 325 | if (isset($obj->item)) { |
| 326 | - $itemName = 'ITEM_' . $obj->item; |
|
| 327 | - echo '<br>+ ' . $locales->$itemName; |
|
| 326 | + $itemName = 'ITEM_'.$obj->item; |
|
| 327 | + echo '<br>+ '.$locales->$itemName; |
|
| 328 | 328 | } elseif (isset($obj->info)) { |
| 329 | - $infoName = 'INFO_' . $obj->info; |
|
| 330 | - echo '<br>(' . $locales->$infoName . ')'; |
|
| 329 | + $infoName = 'INFO_'.$obj->info; |
|
| 330 | + echo '<br>('.$locales->$infoName.')'; |
|
| 331 | 331 | } |
| 332 | 332 | else { |
| 333 | 333 | echo '<br> </br>'; |
@@ -743,7 +743,7 @@ discard block |
||
| 743 | 743 | FROM gymmember |
| 744 | 744 | LEFT JOIN gympokemon |
| 745 | 745 | ON gymmember.pokemon_uid = gympokemon.pokemon_uid |
| 746 | - WHERE gymmember.gym_id = '". $data->gym_id ."' |
|
| 746 | + WHERE gymmember.gym_id = '". $data->gym_id."' |
|
| 747 | 747 | ORDER BY deployment_time"; |
| 748 | 748 | $pkm_result = $mysqli->query($pkm_req); |
| 749 | 749 | while ($pkm_result && $pkm_data = $pkm_result->fetch_object()) { |
@@ -810,7 +810,7 @@ discard block |
||
| 810 | 810 | $entry->total_cp_diff = 0; |
| 811 | 811 | $entry->only_cp_changed = true; |
| 812 | 812 | if ($idx < count($entries) - 1) { |
| 813 | - $next_entry = $entries[$idx+1]; |
|
| 813 | + $next_entry = $entries[$idx + 1]; |
|
| 814 | 814 | $entry->total_cp_diff = $entry->total_cp - $next_entry->total_cp; |
| 815 | 815 | $entry->class = $entry->total_cp_diff > 0 ? 'gain' : ($entry->total_cp_diff < 0 ? 'loss' : ''); |
| 816 | 816 | $entry_pokemon = preg_split('/,/', $entry->pokemon_uids, null, PREG_SPLIT_NO_EMPTY); |
@@ -823,7 +823,7 @@ discard block |
||
| 823 | 823 | foreach ($old_pokemon as $pkm) { |
| 824 | 824 | $next_entry->pokemon[$pkm]->class = 'old'; |
| 825 | 825 | } |
| 826 | - if ($entry->team_id != $next_entry->team_id|| $entry->pokemon_uids != $next_entry->pokemon_uids) { |
|
| 826 | + if ($entry->team_id != $next_entry->team_id || $entry->pokemon_uids != $next_entry->pokemon_uids) { |
|
| 827 | 827 | $entry->only_cp_changed = false; |
| 828 | 828 | } |
| 829 | 829 | } |
@@ -53,10 +53,10 @@ |
||
| 53 | 53 | $pokedatas = json_decode(file_get_contents($pokemonstats_file), true); |
| 54 | 54 | } |
| 55 | 55 | if (is_file($pokedex_counts_file)) { |
| 56 | - $pokecountdatas = json_decode(file_get_contents($pokedex_counts_file), true); |
|
| 56 | + $pokecountdatas = json_decode(file_get_contents($pokedex_counts_file), true); |
|
| 57 | 57 | } |
| 58 | 58 | if (is_file($pokedex_raids_file)) { |
| 59 | - $raiddatas = json_decode(file_get_contents($pokedex_raids_file), true); |
|
| 59 | + $raiddatas = json_decode(file_get_contents($pokedex_raids_file), true); |
|
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | JOIN spawnpoint s ON p.spawnpoint_id = s.id |
| 36 | 36 | " . $where." |
| 37 | 37 | ) x |
| 38 | - " . $where . " |
|
| 38 | + " . $where." |
|
| 39 | 39 | ORDER BY last_timestamp DESC |
| 40 | 40 | LIMIT 0,1"; |
| 41 | 41 | $result = $mysqli->query($req); |