-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GeolocatorInterface so new geolocation implementations know what …
…to do
- Loading branch information
1 parent
a476f32
commit 133b166
Showing
3 changed files
with
15 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace Ibericode\Vat\Geolocation; | ||
|
||
interface GeolocatorInterface { | ||
|
||
/** | ||
* @param string $ipAddress The IP address to geolocate | ||
* @return string A ISO-3166-1-alpha2 country code or an empty string on failure | ||
*/ | ||
public function locateIpAddress(string $ipAddress) : string; | ||
|
||
} | ||
Check failure on line 13 in src/Geolocation/GeolocatorInterface.php GitHub Actions / Coding Standards (8.2)
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
* | ||
* @package Ibericode\Vat\Geolocation | ||
*/ | ||
class IP2C | ||
class IP2C implements GeolocatorInterface | ||
{ | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters