Skip to content

Commit

Permalink
Corrected docblock formatting, and renamed $sort_flags to $options
Browse files Browse the repository at this point in the history
  • Loading branch information
JamShady committed Dec 5, 2013
1 parent 0019105 commit 7898aa6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Illuminate/Support/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,10 @@ public function sort(Closure $callback)
* Sort the collection using the given Closure.
*
* @param \Closure $callback
* @param int $sort_flags
* @param int $options
* @return \Illuminate\Support\Collection
*/
public function sortBy(Closure $callback, $sort_flags = SORT_REGULAR)
public function sortBy(Closure $callback, $options = SORT_REGULAR)
{
$results = array();

Expand All @@ -235,7 +235,7 @@ public function sortBy(Closure $callback, $sort_flags = SORT_REGULAR)
$results[$key] = $callback($value);
}

asort($results, $sort_flags);
asort($results, $options);

// Once we have sorted all of the keys in the array, we will loop through them
// and grab the corresponding model so we can set the underlying items list
Expand Down

0 comments on commit 7898aa6

Please sign in to comment.