shaarli / Shaarli

The personal, minimalist, super-fast, database free, bookmarking service - community repo
https://shaarli.readthedocs.io/
Other
3.41k stars 291 forks source link

DX: Improve HTTP request accessor #2045

Open ArthurHoaro opened 10 months ago

ArthurHoaro commented 10 months ago

Follow-up of https://github.com/shaarli/Shaarli/pull/1972#pullrequestreview-1386513173

With the latest upgrade to Slim 4, we retrieve query and payload parameters, with $object->getArray()['key'] ?? 'default'. This is not great for readability and maintainability, and could easily be improved with either:

Whichever solution can make the code better and is relatively easy to set up.