DivideBV/Postnl

GetNearestLocations method name inconsistency

Closed this issue · 1 comments

In the Location webservice, there is a function called GetNearestLocations. It is implemented in this library as GetNearestLocation (singular, without the 's'). This is quite confusing as (1) it returns multiple locations, and (2) people are likely to try the function from the documentation, which doesn't exist.

Is it okay if I fix this in a PR and create a GetNearestLocations function which wraps GetNearestLocation (to maintain backwards compatibility)? Or is this undesirable and should we consider this a non-issue (and I shouldn't complain 😛)?

Oh yes, good catch. I fully agree.

Do it the other way around though: rename the function, then create a function with the old name, wrapping the correct function. And mark the wrapper deprecated in the docbloc. I'll be glad to merge it if you create a PR

The same should be done with the one in Postnl.php by the way.