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)
219219 }
220220
221221 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 ();
225225 }
226226
227- return collect ($ this ->query ->orders )-> map ( function ( $ direction , $ column ) {
228- return [
227+ return collect ($ this ->query ->orders )
228+ -> map ( fn ( $ direction , $ column ) => [
229229 'column ' => $ column ,
230230 'direction ' => $ direction === 1 ? 'asc ' : 'desc ' ,
231- ];
232- })->values ();
231+ ])->values ();
233232 }
234233}
You can’t perform that action at this time.
0 commit comments