File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -219,16 +219,15 @@ protected function ensureOrderForCursorPagination($shouldReverse = false)
219
219
}
220
220
221
221
if ($ shouldReverse ) {
222
- $ this ->query ->orders = collect ($ this ->query ->orders )-> map ( function ( $ direction ) {
223
- return $ direction === 1 ? -1 : 1 ;
224
- }) ->toArray ();
222
+ $ this ->query ->orders = collect ($ this ->query ->orders )
223
+ -> map ( fn ( int $ direction) => $ direction === 1 ? -1 : 1 )
224
+ ->toArray ();
225
225
}
226
226
227
- return collect ($ this ->query ->orders )-> map ( function ( $ direction , $ column ) {
228
- return [
227
+ return collect ($ this ->query ->orders )
228
+ -> map ( fn ( $ direction , $ column ) => [
229
229
'column ' => $ column ,
230
230
'direction ' => $ direction === 1 ? 'asc ' : 'desc ' ,
231
- ];
232
- })->values ();
231
+ ])->values ();
233
232
}
234
233
}
You can’t perform that action at this time.
0 commit comments