What’s the best name for a function that checks device count thresholds for orders?
Asked by
spoon rest
I need some help with naming a function related to order processing in my PHP application. The function's job is to check if an order has more than a specified number of devices, which I retrieve from a ConfigService class. This way, I can easily switch the data source later on (like from a file to a database). Currently, I have it named `getOrderRepairsTotalDeviceCountThreshold()`, but I'm feeling like it's too long and overly specific. As someone with a German background, I tend to create long descriptive names. How would you name or structure this method? Any suggestions for making it clearer or more concise?
Answers
Your function name is actually pretty decent! It’s descriptive enough to convey what it does. Sometimes it's better to stick with longer names in production until you have a clearer idea of what fits. The context you gain will help you find a more suitable name later.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions