Skip to content

Commit ea95574

Browse files
authored
Merge pull request #114 from maxmind/greg/fix-linting-issues
Run new php-cs-fixer against code
2 parents ada723d + 2b34280 commit ea95574

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

examples/benchmark.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
$count = 50000;
1111
$startTime = microtime(true);
1212
for ($i = 0; $i < $count; ++$i) {
13-
$ip = long2ip(rand(0, pow(2, 32) - 1));
13+
$ip = long2ip(rand(0, 2 ** 32 - 1));
1414
$t = $reader->get($ip);
1515
if ($i % 1000 === 0) {
1616
echo $i . ' ' . $ip . "\n";

src/MaxMind/Db/Reader/Decoder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ private function decodeArray(int $size, int $offset): array
172172

173173
for ($i = 0; $i < $size; ++$i) {
174174
[$value, $offset] = $this->decode($offset);
175-
array_push($array, $value);
175+
$array[] = $value;
176176
}
177177

178178
return [$array, $offset];

0 commit comments

Comments
 (0)