Orders the values mapped from the supplied function descendingly
Example expression function:
public orderByDescending ( callable $function ) : Pinq\Interfaces\IOrderedTraversable | ||
$function | callable | The mapping function |
return | Pinq\Interfaces\IOrderedTraversable |
/** * @dataProvider names */ public function testThatOrderByDescendingIsEquivalentToOrderByWithDescendingDirection(\Pinq\ITraversable $names, array $data) { $function = function ($i) { return $i[0]; }; $orderedNames = $names->orderByDescending($function); $otherOrderedNames = $names->orderBy($function, \Pinq\Direction::DESCENDING); $this->assertSame($orderedNames->asArray(), $otherOrderedNames->asArray()); }