Failed Conditions
Pull Request — master (#371)
by
unknown
02:12
created

pages/pokemon.page.php (46 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<!-- Header -->
2
<header id="single-header">
3
4
	<!-- Breadcrumb -->
5
	<div class="row">
6
		<div class="col-md-12">
7
			<ol class="breadcrumb">
8
				<li><a href="<?= HOST_URL; ?>"><?= $locales->HOME; ?></a></li>
0 ignored issues
show
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
9
				<li><a href="pokemon"><?= $locales->NAV_POKEDEX; ?></a></li>
10
				<li class="active"><?= $pokemon->name; ?></li>
11
			</ol>
12
		</div>
13
	</div>
14
	<!-- /Breadcrumb -->
15
16
	<div class="row">
17
18
		<div class="col-sm-1 hidden-xs">
19
20
				<?php if ($pokemon->id - 1 > 0) {
0 ignored issues
show
The opening PHP tag must be the first content in the file
Loading history...
21
    ?>
22
23
				<p class="nav-links"><a href="pokemon/<?= $pokemon->id - 1; ?>"><i class="fa fa-chevron-left"></i></a></p>
24
25
				<?php
26
}?>
27
28
		</div>
29
30
		<div class="col-sm-10 text-center">
31
32
			<h1>#<?= sprintf('%03d <strong>%s</strong>', $pokemon->id, $pokemon->name); ?><br>
33
			<small>[<?= $pokemon->rarity; ?>]</small></h1>
34
35
			<p id="share">
36
				<a href="https://www.facebook.com/sharer/sharer.php?u=<?= HOST_URL; ?>pokemon/<?= $pokemon->id; ?>" target="_blank" class="btn btn-primary" title="<?php printf($locales->SHARE, 'Facebook'); ?>" ><?php printf($locales->SHARE, ''); ?> <i class="fa fa-facebook" aria-hidden="true"></i></a>
0 ignored issues
show
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
37
38
				<a href="https://twitter.com/intent/tweet?source=<?= HOST_URL; ?>pokemon/<?= $pokemon_id; ?>&text=Find%20<?= $pokemon->name; ?>%20in:%20<?= $config->infos->city; ?>%20<?= HOST_URL; ?>pokemon/<?= $pokemon->id; ?>" target="_blank" title="<?php printf($locales->SHARE, 'Twitter'); ?>" class="btn btn-info"><?php printf($locales->SHARE, ''); ?> <i class="fa fa-twitter" aria-hidden="true"></i></a>
0 ignored issues
show
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
39
			</p>
40
41
		</div>
42
43
44
		<div class="col-sm-1 hidden-xs">
45
46
			<?php if ($pokemon->id + 1 < $config->system->max_pokemon) {
47
        ?>
48
49
			<p class="nav-links"><a href="pokemon/<?= $pokemon->id + 1; ?>"><i class="fa fa-chevron-right"></i></a></p>
50
51
			<?php
52
    } ?>
0 ignored issues
show
Closing brace indented incorrectly; expected 0 spaces, found 4
Loading history...
53
		</div>
54
55
	</div>
56
<?php
57
    $form_array = array('Unset', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'W', 'X', 'Y', 'Z');
58
    $form_array = array_values($form_array);
59
    ?>
60
61
</header>
62
<!-- /Header -->
63
64
65
<div class="row">
66
	<div class="col-md-2 col-xs-4">
67
		<div id="poke-img" style="padding-top:15px;margin-bottom:1em;">
68
			<img class="media-object img-responsive" src="<?= $pokemon->img; ?>" alt="<?= $pokemon->name; ?> model" >
0 ignored issues
show
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
69
		</div>
70
	</div>
71
72
	<div class="col-md-4 col-xs-8" style="margin-bottom:1em;">
73
74
		<div class="media">
75
			<div class="media-body" style="padding-top:25px;">
76
77
				<p><?= $pokemon->description; ?></p>
78
79
				<p>
80
				<?php foreach ($pokemon->types as $type) {
81
        ?>
82
					<span class="label label-default" style="background-color:<?= $pokemons->typecolors->$type; ?>"><?= $type; ?></span>
0 ignored issues
show
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
83
				<?php
84
    }?>
0 ignored issues
show
Closing brace indented incorrectly; expected 0 spaces, found 4
Loading history...
85
				</p>
86
87
			</div>
88
		</div>
89
90
	</div>
91
92
	<div class="col-md-6" style="padding-top:10px;">
93
		<canvas id="spawn_chart" width="100%" height="40"></canvas>
94
	</div>
95
96
</div>
97
98
99
100
<div class="row">
101
	<div class="col-md-6" style="padding-top:10px;">
102
		<div class="table-responsive">
103
		<table class="table">
104
            <tr>
105
                <td class="col-md-8 col-xs-8"><strong><?= $locales->POKEMON_GEN; ?></strong></td>
106
                <td class="col-md-4 col-xs-4"><?= $pokemon->gen; ?></td>
107
            </tr>
108
			<tr>
109
				<td class="col-md-8 col-xs-8"><strong><?= $locales->POKEMON_SEEN; ?></strong></td>
110
				<td class="col-md-4 col-xs-4">
111
112
				<?php
113 View Code Duplication
                if (isset($pokemon->last_position)) {
114
                    ?>
115
116
					<a href="https://maps.google.com/?q=<?= $pokemon->last_position->latitude; ?>,<?= $pokemon->last_position->longitude; ?>&ll=<?= $pokemon->last_position->latitude; ?>,<?= $pokemon->last_position->longitude; ?>&z=16" target="_blank"><?= time_ago($pokemon->last_seen, $locales); ?></a>
0 ignored issues
show
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
117
118
				    <?php
119
                } else {
120
                    echo $locales->NEVER;
121
                }
122
                ?>
123
124
				</td>
125
			</tr>
126
			<tr>
127
				<td class="col-md-8 col-xs-8"><strong><?= $locales->POKEMON_AMOUNT; ?></strong></td>
128
				<td class="col-md-4 col-xs-4"><?= $pokemon->spawn_count; ?> <?= $locales->SEEN; ?></td>
0 ignored issues
show
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
129
			</tr>
130
			<tr>
131
				<td class="col-md-8 col-xs-8"><strong><?= $locales->POKEMON_RATE; ?></strong></td>
132
				<td class="col-md-4 col-xs-4"><?= $pokemon->spawns_per_day; ?> / <?= $locales->DAY; ?></td>
0 ignored issues
show
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
133
			</tr>
134
			<tr>
135
				<td class="col-md-8 col-xs-8">
136
                    <?php
137
                    if (isset($pokemon->protected_gyms)) {
138
                        echo '<strong>'.$locales->POKEMON_GYM.$pokemon->name.'</strong>';
139
                    } ?>
140
                </td>
141
				<td class="col-md-4 col-xs-4">
142
                    <?php
143
                    if (isset($pokemon->protected_gyms)) {
144
                        echo $pokemon->protected_gyms;
145
                    }?>
146
                </td>
147
			</tr>
148
		</table>
149
		</div>
150
		</div>
151
152
		<div class="col-md-6" style="padding-top:10px;">
153
		<div class="table-responsive">
154
		<table class="table">
155
			<tr>
156
				<td class="col-md-8 col-xs-8"><strong><?= $locales->POKEMON_RAID_SEEN; ?></strong></td>
157
				<td class="col-md-4 col-xs-4">
158
159
                    <?php
160 View Code Duplication
                    if (isset($pokemon->last_raid_position)) {
161
                        ?>
162
163
					    <a href="https://maps.google.com/?q=<?= $pokemon->last_raid_position->latitude; ?>,<?= $pokemon->last_raid_position->longitude; ?>&ll=<?= $pokemon->last_raid_position->latitude; ?>,<?= $pokemon->last_raid_position->longitude; ?>&z=16" target="_blank"><?= time_ago($pokemon->last_raid_seen, $locales); ?></a>
0 ignored issues
show
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
164
165
					    <?php
166
                    } else {
167
                        echo $locales->NEVER;
168
                    }
169
                    ?>
170
171
				</td>
172
			</tr>
173
			<tr>
174
				<td class="col-md-8 col-xs-8"><strong><?= $locales->POKEMON_RAID_AMOUNT; ?></strong></td>
175
				<td class="col-md-4 col-xs-4"><?= $pokemon->raid_count; ?> <?= $locales->SEEN; ?></td>
0 ignored issues
show
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
176
			</tr>
177
			<tr>
178
				<td class="col-md-8 col-xs-8"><strong><?= $locales->POKEMON_QUICK; ?></strong></td>
179
				<td class="col-md-4 col-xs-4"><?= $pokemon->quick_move; ?></td>
180
			</tr>
181
			<tr>
182
				<td class="col-md-8 col-xs-8"><strong><?= $locales->POKEMON_SPECIAL; ?></strong> </td>
183
				<td class="col-md-4 col-xs-4"><?= $pokemon->charge_move; ?></td>
184
			</tr>
185
186
		</table>
187
		</div>
188
	</div>
189
</div>
190
191
192
<div class="row area text-center subnav">
193
	<div class="btn-group" role="group">
194
		<a class="btn btn-default page-scroll" href="pokemon/<?= $pokemon->id; ?>#where"><i class="fa fa-map-marker"></i> <?= $locales->POKEMON_MAP; ?></a>
0 ignored issues
show
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
195
		<a class="btn btn-default page-scroll" href="pokemon/<?= $pokemon->id; ?>#stats"><i class="fa fa-pie-chart"></i> <?= $locales->POKEMON_STATS; ?></a>
0 ignored issues
show
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
196
		<a class="btn btn-default page-scroll" href="pokemon/<?= $pokemon->id; ?>#evolve"><i class="fa fa-flash"></i> <?= $locales->POKEMON_EVOLUTIONS; ?></a>
0 ignored issues
show
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
197
		<a class="btn btn-default page-scroll" href="pokemon/<?= $pokemon->id; ?>#family"><i class="fa fa-share-alt"></i> <?= $locales->POKEMON_FAMILY; ?></a>
0 ignored issues
show
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
198
		<a class="btn btn-default page-scroll" href="pokemon/<?= $pokemon->id; ?>#top50"><i class="fa fa-list"></i> Top50</a>
199
		<a class="btn btn-default page-scroll" href="pokemon/<?= $pokemon->id; ?>#trainer"><i class="fa fa-users"></i> <?= $locales->TRAINERS; ?></a>
0 ignored issues
show
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
200
	</div>
201
</div>
202
203
204
<div class="row" id="where">
205
	<div class="col-md-12">
206
		<h2 class="text-center sub-title"><?= $locales->POKEMON_WHERE; ?> <?= $pokemon->name; ?>?</h2>
0 ignored issues
show
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
207
	</div>
208
</div>
209
<div class="row text-center subnav">
210
	<div class="btn-group" role="group">
211
		<a class="btn btn-default active" id="heatmapSelector"><i class="fa fa-thermometer-three-quarters"></i> <?= $locales->POKEMON_HEATMAP_BUTTON; ?></a>
212
		<a class="btn btn-default " id="liveSelector"><i class="fa fa-eye"></i> <?= $locales->POKEMON_LIVE_BUTTON; ?></a>
213
	</div>
214
</div>
215
<div class="row" style="margin-bottom:20px">
216
	<div class="col-md-12" id="timeFilterContainer">
217
		<div id="timeSelector">
218
		</div>
219
	</div>
220
	<div class="col-md-12" id="liveFilterContainer">
221
		<div id="liveFilterSelector">
222
		</div>
223
	</div>
224
	<div class="col-md-12 text-center" id="loaderContainer">
225
		<h3><?= $locales->LOADING; ?></h3>
226
	</div>
227
</div>
228
<div class="row area">
229
	<div class="col-md-12">
230
		<div id="map">
231
		</div>
232
	</div>
233
</div>
234
235
236
237
238
<div class="row area" id="stats">
239
240
	<h2 class="text-center sub-title"><strong><?= $pokemon->name; ?> </strong><?= $locales->POKEMON_BREAKDOWN; ?></h2>
0 ignored issues
show
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
241
242
	<!-- Rating -->
243
	<p class="text-center stats-data"><big><?= $pokemon->rating; ?> / 10</big><br><?= $locales->POKEMON_RATING; ?></p>
0 ignored issues
show
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
244
245
	<!-- CP Datas -->
246
	<div class="col-md-3 stats-data">
247
248
		<p><big><?= $pokemon->max_cp; ?></big><br/><?= $locales->POKEMON_CP; ?></p>
0 ignored issues
show
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
249
250
		<div class="progress" style="margin-bottom:0;">
251
			<div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="<?= $pokemon->max_cp_percent; ?>" aria-valuemin="0" aria-valuemax="100" style="width: <?= $pokemon->max_cp_percent; ?>%;min-width:30%;">
0 ignored issues
show
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
252
				<?= $pokemon->max_cp_percent; ?> %
253
			</div>
254
		</div>
255
256
		<?= $locales->POKEMON_COMPGAME; ?>
257
258
	</div>
259
260
	<!-- Chart -->
261
	<div class="col-md-6">
262
263
		<canvas id="polar_chart" width="100%" height="60"></canvas>
264
265
	</div>
266
	<!-- /Chart -->
267
268
	<!-- PV Datas -->
269
	<div class="col-md-3 stats-data">
270
271
		<p><big><?= $pokemon->max_hp; ?></big><br/><?= $locales->POKEMON_HP; ?></p>
0 ignored issues
show
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
272
273
		<div class="progress" style="margin-bottom:0;">
274
			<div class="progress-bar progress-bar-success progress-bar-striped active" role="progressbar" aria-valuenow="<?= $pokemon->max_hp_percent; ?>" aria-valuemin="0" aria-valuemax="100" style="width: <?= $pokemon->max_hp_percent; ?>%;min-width:30%;">
0 ignored issues
show
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
275
				<?= $pokemon->max_hp_percent; ?> %
276
			</div>
277
		</div>
278
279
		<?= $locales->POKEMON_COMPGAME; ?>
280
281
	</div>
282
283
</div>
284
285
<div class="row area" id="evolve">
286
287
	<h2 class="text-center sub-title"><strong><?= $pokemon->name; ?> </strong><?= $locales->POKEMON_EVOLUTIONS; ?></h2>
0 ignored issues
show
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
288
289
	<div class="col-md-12 flex-container-tree results">
290
291
		<?php
292
        $tree = array($pokemon->tree);
293
        $depth = get_depth($tree);
294
        $skip = false;
295
        for ($i = 0; $i < $depth; ++$i) {
296
            $i_id = intval(($i + 1) / 2);
297
            $data = get_tree_at_depth($tree, $i_id, $config->system->max_pokemon); ?>
298
299
			<?php
300
            if (!is_null($data) && 0 != sizeof($data) && !$skip) {
301
                ?>
302
				<div class="col-md-12 flex-item-tree">
303
					<?php
304
                    foreach ($data as $obj) {
305
                        $obj_id = $obj->id;
306
                        $tree_pokemon = $pokemons->pokemon->$obj_id;
307
                        $link = 'pokemon/'.$obj_id;
308
309
                        if (0 == $i % 2) {
310
                            ?>
311
312
							<div>
313
								<a href="<?= $link; ?>"><img src="<?= $tree_pokemon->img; ?>" alt="<?= $tree_pokemon->name; ?>" class="img"></a>
0 ignored issues
show
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
314
								<p class="pkmn-name"><a href="<?= $link; ?>">#<?= sprintf('%03d<br>%s', $tree_pokemon->id, $tree_pokemon->name); ?></a></p>
0 ignored issues
show
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
315
							</div>
316
317
						<?php
318
                        } else {
319
                            ?>
320
321
							<div>
322
								<img src="core/img/arrow<?=$obj->array_sufix; ?>.png" alt="Arrow" class="img">
323
								<p class="pkmn-name">
324
									<?php
325
                                    if (isset($obj->candies)) {
326
                                        echo $obj->candies.' '.$locales->POKEMON_CANDIES;
327
                                    } else {
328
                                        echo '? '.$locales->POKEMON_CANDIES;
329
                                    }
330
331
                            if (isset($obj->item)) {
332
                                $itemName = 'ITEM_'.$obj->item;
333
                                echo '<br>+ '.$locales->$itemName;
334
                            } elseif (isset($obj->info)) {
335
                                $infoName = 'INFO_'.$obj->info;
336
                                echo '<br>('.$locales->$infoName.')';
337
                            } else {
338
                                echo '<br> </br>';
339
                            } ?>
340
								</p>
341
							</div>
342
                            <?php
343
                        }
344
                    } ?>
345
                </div>
346
            <?php
347
            } elseif ($skip) {
348
                $skip = false;
349
            } else {
350
                $skip = true;
351
            }
352
        }
353
        ?>
354
	</div>
355
</div>
356
357
358
<div class="row area" id="family">
359
360
	<div class="col-md-12">
361
362
		<h2 class="text-center sub-title"><strong><?= $pokemon->name; ?></strong><?= $locales->POKEMON_FAMILYTITLE; ?></h2>
0 ignored issues
show
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
363
364
		<div class="row">
365
366
		<?php
367
368
        foreach ($related as $related_mon) {
369
            ?>
370
371
			<div class="col-md-1 col-sm-2 col-xs-3 pokemon-single">
372
373
				<a href="pokemon/<?= $related_mon; ?>">
374
					<img src="<?= $pokemons->pokemon->$related_mon->img; ?>" alt="<?= $pokemons->pokemon->$related_mon->name; ?>" class="img-responsive">
0 ignored issues
show
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
375
				</a>
376
377
			</div>
378
379
380
			<?php
381
        }
382
383
        ?>
384
385
		</div>
386
387
	</div>
388
389
</div>
390
391
392
<?php if (!empty($top)) {
393
            ?>
394
	<div class="row area" id="top50">
395
		<div class="col-md-12">
396
			<h2 class="text-center sub-title">Top 50 <strong><?= $pokemon->name; ?></strong></h2>
397
			<div class="table-responsive">
398
				<table class="table">
399
					<thead>
400
						<tr>
401
							<th>#</th>
402
							<th><a href="pokemon/<?= $pokemon->id; ?>?order=cp<?php echo 'cp' == $best_order && !isset($_GET['direction']) ? '&direction=desc' : ''; ?>#top50">CP <i class="fa fa-sort" aria-hidden="true"></i></a></th>
403
							<th><a href="pokemon/<?= $pokemon->id; ?>?order=IV<?php echo 'IV' == $top_order && !isset($_GET['direction']) ? '&direction=desc' : ''; ?>#top50">IV <i class="fa fa-sort" aria-hidden="true"></i></a></th>
404
							<th><a href="pokemon/<?= $pokemon->id; ?>?order=individual_attack<?php echo 'individual_attack' == $top_order && !isset($_GET['direction']) ? '&direction=desc' : ''; ?>#top50"><?= $locales->POKEMON_TABLE_ATTACK; ?> <i class="fa fa-sort" aria-hidden="true"></i></a></th>
0 ignored issues
show
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
405
							<th><a href="pokemon/<?= $pokemon->id; ?>?order=individual_defense<?php echo 'individual_defense' == $top_order && !isset($_GET['direction']) ? '&direction=desc' : ''; ?>#top50"><?= $locales->POKEMON_TABLE_DEFENSE; ?> <i class="fa fa-sort" aria-hidden="true"></i></a></th>
0 ignored issues
show
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
406
							<th><a href="pokemon/<?= $pokemon->id; ?>?order=individual_stamina<?php echo 'individual_stamina' == $top_order && !isset($_GET['direction']) ? '&direction=desc' : ''; ?>#top50"><?= $locales->POKEMON_TABLE_STAMINA; ?> <i class="fa fa-sort" aria-hidden="true"></i></a></th>
0 ignored issues
show
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
407
							<th><a href="pokemon/<?= $pokemon->id; ?>?order=move_1<?php echo 'move_1' == $top_order && !isset($_GET['direction']) ? '&direction=desc' : ''; ?>#top50">1. <?= $locales->MOVE; ?> <i class="fa fa-sort" aria-hidden="true"></i></a></th>
0 ignored issues
show
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
408
							<th><a href="pokemon/<?= $pokemon->id; ?>?order=move_2<?php echo 'move_2' == $top_order && !isset($_GET['direction']) ? '&direction=desc' : ''; ?>#top50">2. <?= $locales->MOVE; ?> <i class="fa fa-sort" aria-hidden="true"></i></a></th>
0 ignored issues
show
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
409
							<th><a href="pokemon/<?= $pokemon->id; ?>?order=disappear_time<?php echo 'disappear_time' == $top_order && !isset($_GET['direction']) ? '&direction=desc' : ''; ?>#top50"><?= $locales->DATE; ?> <i class="fa fa-sort" aria-hidden="true"></i></a></th>
0 ignored issues
show
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
410
							<?php if (201 == $pokemon->id) {
411
                ?>
412
								<th>Form</th>
413
							<?php
414
            } ?>
0 ignored issues
show
Closing brace indented incorrectly; expected 0 spaces, found 12
Loading history...
415
						</tr>
416
					</thead>
417
				
418
					<tbody>
419
						<?php
420
                        $i = 0;
421
            foreach ($top as $top50) {
422
                ++$i;
423
                $move1 = $top50->move_1;
424
                $move2 = $top50->move_2; ?>
425
426
							<tr>
427
								<td><?= $i; ?></td>
428
								<td><?= isset($top50->cp) ? $top50->cp : '???'; ?></td>
429
								<td><?= $top50->IV; ?> %</td>
430
								<td><?= $top50->individual_attack; ?></td>
431
								<td><?= $top50->individual_defense; ?></td>
432
								<td><?= $top50->individual_stamina; ?></td>
433
								<td><?php echo $move->$move1->name; ?></td>
434
								<td><?php echo $move->$move2->name; ?></td>
435
								<td><a href="https://maps.google.com/?q=<?= $top50->latitude; ?>,<?= $top50->longitude; ?>&ll=<?= $top50->latitude; ?>,<?= $top50->longitude; ?>&z=16"
0 ignored issues
show
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
436
									target="_blank"><?=$top50->distime; ?></a></td>
437
								<?php if (201 == $pokemon->id && $top50->form) {
438
                    ?>
439
									<td><?php echo $form_array[$top50->form]; ?></td>
440
								<?php
441
                } else {
0 ignored issues
show
Closing brace indented incorrectly; expected 0 spaces, found 16
Loading history...
442
                    ?>
443
									<td></td>
444
								<?php
445
                } ?>
446
							</tr>
447
							<?php
448
            } ?>
449
				</tbody>
450
			</table>
451
		</div>
452
	</div>
453
</div>
454
455
<?php
456
        } if ($toptrainer) {
0 ignored issues
show
Closing brace indented incorrectly; expected 0 spaces, found 8
Loading history...
457
            ?>
458
	<div class="row" id="trainer">
459
		<div class="col-md-12">
460
			<h2 class="text-center sub-title"><?= $locales->POKEMON_TOPTRAINER; ?> <strong><?= $pokemon->name; ?></strong></h2>
0 ignored issues
show
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
461
			<div class="table-responsive">
462
				<table class="table">
463
					<thead>
464
						<tr>
465
							<th>#</th>
466
							<th><a href="pokemon/<?= $pokemon->id; ?>?order=trainer_name<?php echo 'trainer_name' == $best_order && !isset($_GET['direction']) ? '&direction=desc' : ''; ?>#trainer"><?= $locales->NAME; ?> <i class="fa fa-sort" aria-hidden="true"></i></a></th>
0 ignored issues
show
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
467
							<th><a href="pokemon/<?= $pokemon->id; ?>?order=cp<?php echo 'cp' == $best_order && !isset($_GET['direction']) ? '&direction=desc' : ''; ?>#trainer">CP <i class="fa fa-sort" aria-hidden="true"></i></a></th>
468
							<th><a href="pokemon/<?= $pokemon->id; ?>?order=IV<?php echo 'IV' == $best_order && !isset($_GET['direction']) ? '&direction=desc' : ''; ?>#trainer">IV <i class="fa fa-sort" aria-hidden="true"></i></a></th>
469
							<th><a href="pokemon/<?= $pokemon->id; ?>?order=move_1<?php echo 'move_1' == $best_order && !isset($_GET['direction']) ? '&direction=desc' : ''; ?>#trainer">1. <?= $locales->MOVE; ?> <i class="fa fa-sort" aria-hidden="true"></i></a></th>
0 ignored issues
show
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
470
							<th><a href="pokemon/<?= $pokemon->id; ?>?order=move_2<?php echo 'move_2' == $best_order && !isset($_GET['direction']) ? '&direction=desc' : ''; ?>#trainer">2. <?= $locales->MOVE; ?> <i class="fa fa-sort" aria-hidden="true"></i></a></th>
0 ignored issues
show
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
471
							<th><a href="pokemon/<?= $pokemon->id; ?>?order=last_seen<?php echo 'last_seen' == $best_order && !isset($_GET['direction']) ? '&direction=desc' : ''; ?>#trainer"><?= $locales->POKEMON_TABLE_SEEN; ?> <i class="fa fa-sort" aria-hidden="true"></i></a></th>
0 ignored issues
show
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
472
						</tr>
473
					</thead>
474
					<tbody>
475
						<?php
476
                        $i = 0;
477
            foreach ($toptrainer as $besttrainer) {
478
                ++$i;
479
                $move1 = $besttrainer->move_1;
480
                $move2 = $besttrainer->move_2; ?>
481
482
							<tr>
483
								<td><?= $i; ?></td>
484
								<td><a href="trainer?name=<?=$besttrainer->trainer_name; ?>"><?=$besttrainer->trainer_name; ?> </a></td>
0 ignored issues
show
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
485
								<td><?= $besttrainer->cp; ?></td>
486
								<td><?= $besttrainer->IV; ?> %</td>
487
								<td><?php echo $move->$move1->name; ?></td>
488
								<td><?php echo $move->$move2->name; ?></td>
489
								<td><?=$besttrainer->lasttime; ?></td>
490
							</tr>
491
							<?php
492
            } ?>
493
				</tbody>
494
			</table>
495
		</div>
496
	</div>
497
</div>
498
<?php
499
        } ?>
500