location
location copied to clipboard
Mixed usage of area code values
It seems the area code is implemented differently in several drivers. Some drivers are returning the region/state such as CA
and some are returning real area codes like phone numbers such as 555
.
I think this makes it difficult to implement and rely on this attribute with the fallback functionality. Imagine inserting data with the area code and having different values in a database, it would result in a lot of bugs and cases needing to account for these differences. Is there a way maybe some of these non numeric drivers could just set their values to null
?
Are there any other things like this that might be good to outline in the readme?
Hi @dmyers,
Are you able to identify which drivers are returning different data for area code? The driver name should be included in the Position
object returned via the Location::get()
method.
https://github.com/stevebauman/location/blob/master/src/Drivers/IpApi.php#L31