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 @@ -228,16 +228,15 @@ protected function ensureOrderForCursorPagination($shouldReverse = false)
228
228
}
229
229
230
230
if ($ shouldReverse ) {
231
- $ this ->query ->orders = collect ($ this ->query ->orders )-> map ( function ( $ direction ) {
232
- return $ direction === 1 ? -1 : 1 ;
233
- }) ->toArray ();
231
+ $ this ->query ->orders = collect ($ this ->query ->orders )
232
+ -> map ( fn ( int $ direction) => $ direction === 1 ? -1 : 1 )
233
+ ->toArray ();
234
234
}
235
235
236
- return collect ($ this ->query ->orders )-> map ( function ( $ direction , $ column ) {
237
- return [
236
+ return collect ($ this ->query ->orders )
237
+ -> map ( fn ( $ direction , $ column ) => [
238
238
'column ' => $ column ,
239
239
'direction ' => $ direction === 1 ? 'asc ' : 'desc ' ,
240
- ];
241
- })->values ();
240
+ ])->values ();
242
241
}
243
242
}
You can’t perform that action at this time.
0 commit comments