looks ok. maybe not the cleanest way but if it works. Usually I name Services similar to the resource they work with. I would name it DispatcherService and put the methods in there. Then it's easier to see what files are working together
Thank you for your opinion
Could you recommend the cleanest way pls
Or should i use trait to clean up the declined service?
Are there other classes that use the same methods? If not, don't use traits. That's what they are for.
work on naming the functions more clearly. This isn't clear that it's updating anything. $this->status($orderId, $dispatcherId); this is a little clearer for example. $this->updateStatus($orderId, $dispatcherId);
Обсуждают сегодня