jabranr / postcodes-io

PHP library for postcodes.io

Home Page:https://postcodes-io/about

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Possibly incorrect parameter order

jamieburchell opened this issue · comments

I think random should be after %s here?

sprintf('/random/%s', static::API_POSTCODES_ENDPOINT)

Hey @jabranr I apologise - I misunderstood that the end result should have been /random/postcodes after all so this wasn't an issue in the first place :/

@jamieburchell No worries. However, I found that %s substitution was adding an extra / because the value of constant API_POSTCODES_ENDPOINT is /postcodes – so I have changed it from /random/%s to /random%s.