Skip to content

Commit

Permalink
Do not call useless floor() (#15343)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmichot authored and taylorotwell committed Sep 8, 2016
1 parent f6128a3 commit a6f1cf5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Support/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function median($key = null)
$values = with(isset($key) ? $this->pluck($key) : $this)
->sort()->values();

$middle = (int) floor($count / 2);
$middle = (int) ($count / 2);

if ($count % 2) {
return $values->get($middle);
Expand Down

0 comments on commit a6f1cf5

Please sign in to comment.