Skip to content

Commit c792068

Browse files
committed
formatting
1 parent d57a9a4 commit c792068

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Illuminate/Support/Collection.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1340,8 +1340,7 @@ public function sort(callable $callback = null)
13401340
*/
13411341
public function sortBy($callback, $options = SORT_REGULAR, $descending = false)
13421342
{
1343-
$values = [];
1344-
$results = [];
1343+
list($values, $results) = [[], []];
13451344

13461345
$callback = $this->valueRetriever($callback);
13471346

@@ -1353,7 +1352,9 @@ public function sortBy($callback, $options = SORT_REGULAR, $descending = false)
13531352
}
13541353

13551354
$keys = array_keys($this->items);
1355+
13561356
$order = $descending ? SORT_DESC : SORT_ASC;
1357+
13571358
array_multisort($values, $order, $options, $keys, $order);
13581359

13591360
// Once we have sorted all of the keys in the array, we will loop through them

0 commit comments

Comments
 (0)