Skip to content

Commit

Permalink
Add GeolocatorInterface so new geolocation implementations know what …
Browse files Browse the repository at this point in the history
…to do
  • Loading branch information
dannyvankooten committed Sep 6, 2023
1 parent a476f32 commit 133b166
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
13 changes: 13 additions & 0 deletions src/Geolocation/GeolocatorInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace Ibericode\Vat\Geolocation;

interface GeolocatorInterface {

Check failure on line 5 in src/Geolocation/GeolocatorInterface.php

View workflow job for this annotation

GitHub Actions / Coding Standards (8.2)

Opening brace of a interface must be on the line after the definition

/**
* @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

View workflow job for this annotation

GitHub Actions / Coding Standards (8.2)

Expected 1 newline at end of file; 0 found

Check failure on line 13 in src/Geolocation/GeolocatorInterface.php

View workflow job for this annotation

GitHub Actions / Coding Standards (8.2)

The closing brace for the interface must go on the next line after the body
2 changes: 1 addition & 1 deletion src/Geolocation/IP2C.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
* @package Ibericode\Vat\Geolocation
*/
class IP2C
class IP2C implements GeolocatorInterface
{

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Geolocation/IP2Country.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
* @package Ibericode\Vat\Geolocation
*/
class IP2Country
class IP2Country implements GeolocatorInterface
{
/**
* @param string $ipAddress
Expand Down

0 comments on commit 133b166

Please sign in to comment.