Extracted logic to geolocate a visit, handling possible domain errors

This commit is contained in:
Alejandro Celaya
2022-09-18 18:44:01 +02:00
parent fe41e9d573
commit 83b7d5a5f1
11 changed files with 214 additions and 31 deletions

View File

@@ -0,0 +1,17 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\Core\Visit;
use Shlinkio\Shlink\Core\Entity\Visit;
use Shlinkio\Shlink\Core\Exception\IpCannotBeLocatedException;
use Shlinkio\Shlink\IpGeolocation\Model\Location;
interface VisitToLocationHelperInterface
{
/**
* @throws IpCannotBeLocatedException
*/
public function resolveVisitLocation(Visit $visit): Location;
}