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)
228228 }
229229
230230 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 ();
234234 }
235235
236- return collect ($ this ->query ->orders )-> map ( function ( $ direction , $ column ) {
237- return [
236+ return collect ($ this ->query ->orders )
237+ -> map ( fn ( $ direction , $ column ) => [
238238 'column ' => $ column ,
239239 'direction ' => $ direction === 1 ? 'asc ' : 'desc ' ,
240- ];
241- })->values ();
240+ ])->values ();
242241 }
243242}
You can’t perform that action at this time.
0 commit comments