Commit 69c3a72
committed
Replace magic strings with enums in sorting logic
Create new SortingMethod enum alongside deprecated FolderSortingMethod for
backward compatibility. Replace all magic string direction values ('asc'/'desc')
with SortingOrder enum constants. Add validateDirection() method to gracefully
handle invalid direction values by defaulting to descending order. Include
comprehensive test coverage for invalid sorting inputs.1 parent 30a281e commit 69c3a72
14 files changed
Lines changed: 823 additions & 75 deletions
File tree
- config
- logs
- src
- Enums
- Http/Controllers
- tests/Feature
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
286 | | - | |
| 286 | + | |
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
292 | | - | |
| 292 | + | |
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
| |||
0 commit comments