alcohol / iso3166

A PHP library providing ISO 3166-1 data.
https://iso3166.thephpleague.com
MIT License
640 stars 59 forks source link

Library extension #44

Closed npispas closed 6 years ago

npispas commented 6 years ago

Extended the functionality of the library in order to support lookup by name identifier.

alcohol commented 6 years ago

I'm open to merging this PR (although I do not see much use for a lookup by name), but not in its current state:

npispas commented 6 years ago

I have completed all of the above requests. The reason for such function is because of a parser that receives a reservation which contains a country name. The parser in turn must map the country name with the corresponding Alpha2 identifier in order to push the reservetion to an API.

On Sun, Dec 31, 2017 at 1:58 PM, Rob notifications@github.com wrote:

I'm open to merging this PR (although I do not see much use for a lookup by name), but not in its current state:

  • you should not commit the .idea directory (tip: add it to your global .gitignore)
  • you should not have changed the name of GB, it is still the same according to ISO3166
  • not sure why you added additional whitespace in that one method but it is not necessary
  • in the keys array, please put name last, not first (same for the class constants)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/thephpleague/iso3166/pull/44#issuecomment-354600023, or mute the thread https://github.com/notifications/unsubscribe-auth/AV7KFY7BMgzYxp8d6-psGavw9B22I0urks5tF3bPgaJpZM4RPkw0 .

alcohol commented 6 years ago

Please, I said global .gitignore, not project .gitignore. I don't have the time right now to rebase this PR myself to adjust this.

npispas commented 6 years ago

Done Mr. Rob. Thanks in advance.

alcohol commented 6 years ago

Tagged as 2.1.0: https://github.com/thephpleague/iso3166/releases/tag/2.1.0