provides cleaner handlers, by moving find/throw exeption logic to services
removes duplicate checks across the code by having the above checks inside services
find* service methods will do one of the following:
find the requested entity and return it, allowing the request to continue processing
not find the requested entity, throw a NotFoundException, which will pass through the handler and get caught by the HandlerTrait's handle method that returns a 404 Not Found response
replaces old /** @ var Class $variable */ annotations with asserts, helping both the IDE and Psalm on inferring types
Contact Qodana team
Contact us at [qodana-support@jetbrains.com](mailto:qodana-support@jetbrains.com)
- Or via our issue tracker: https://jb.gg/qodana-issue
- Or share your feedback: https://jb.gg/qodana-discussions
This PR does the following:
find*
service methods will do one of the following:NotFoundException
, which will pass through the handler and get caught by the HandlerTrait'shandle
method that returns a404 Not Found
response/** @ var Class $variable */
annotations withassert
s, helping both the IDE and Psalm on inferring types