Skip to content

Commit

Permalink
Tweak BufferUnpacker::unpackMap()
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugene Leonovich committed Jun 13, 2016
1 parent f268dd5 commit 6b255af
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/BufferUnpacker.php
Expand Up @@ -376,7 +376,6 @@ private function unpackStr($length)
private function unpackArray($size)
{
$array = [];

for ($i = $size; $i; --$i) {
$array[] = $this->unpack();
}
Expand All @@ -387,12 +386,8 @@ private function unpackArray($size)
private function unpackMap($size)
{
$map = [];

for ($i = $size; $i; --$i) {
$key = $this->unpack();
$value = $this->unpack();

$map[$key] = $value;
$map[$this->unpack()] = $this->unpack();
}

return $map;
Expand Down

0 comments on commit 6b255af

Please sign in to comment.