Skip to content

Commit

Permalink
Simplify getArray
Browse files Browse the repository at this point in the history
  • Loading branch information
Riimu committed Jul 11, 2017
1 parent 99ba415 commit afbd03a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/SecureRandom.php
Expand Up @@ -220,10 +220,7 @@ public function getArray(array $array, $count)
$last = $size - $i - 1;
$index = $this->getNumber($last);
$result[$keys[$index]] = $array[$keys[$index]];

if ($index < $last) {
$keys[$index] = $keys[$last];
}
$keys[$index] = $keys[$last];
}

return $result;
Expand Down

0 comments on commit afbd03a

Please sign in to comment.