Moved Ip resolvers to the Resolver subnamespace

This commit is contained in:
Alejandro Celaya
2019-08-10 13:56:06 +02:00
parent 30314fd532
commit 3520ab6b18
16 changed files with 42 additions and 31 deletions

View File

@@ -1,9 +1,11 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\IpGeolocation;
namespace Shlinkio\Shlink\IpGeolocation\Resolver;
use Shlinkio\Shlink\Common\Exception\WrongIpException;
use Shlinkio\Shlink\IpGeolocation\Model;
use Shlinkio\Shlink\IpGeolocation\Resolver\IpLocationResolverInterface;
class ChainIpLocationResolver implements IpLocationResolverInterface
{

View File

@@ -1,9 +1,11 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\IpGeolocation;
namespace Shlinkio\Shlink\IpGeolocation\Resolver;
use Shlinkio\Shlink\Common\Exception\WrongIpException;
use Shlinkio\Shlink\IpGeolocation\Model;
use Shlinkio\Shlink\IpGeolocation\Resolver\IpLocationResolverInterface;
class EmptyIpLocationResolver implements IpLocationResolverInterface
{

View File

@@ -1,7 +1,7 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\IpGeolocation;
namespace Shlinkio\Shlink\IpGeolocation\Resolver;
use GeoIp2\Database\Reader;
use GeoIp2\Exception\AddressNotFoundException;
@@ -9,6 +9,8 @@ use GeoIp2\Model\City;
use GeoIp2\Record\Subdivision;
use MaxMind\Db\Reader\InvalidDatabaseException;
use Shlinkio\Shlink\Common\Exception\WrongIpException;
use Shlinkio\Shlink\IpGeolocation\Model;
use Shlinkio\Shlink\IpGeolocation\Resolver\IpLocationResolverInterface;
use function Functional\first;

View File

@@ -1,12 +1,14 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\IpGeolocation;
namespace Shlinkio\Shlink\IpGeolocation\Resolver;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\GuzzleException;
use Shlinkio\Shlink\Common\Exception\InvalidArgumentException;
use Shlinkio\Shlink\Common\Exception\WrongIpException;
use Shlinkio\Shlink\IpGeolocation\Model;
use Shlinkio\Shlink\IpGeolocation\Resolver\IpLocationResolverInterface;
use function Shlinkio\Shlink\Common\json_decode;
use function sprintf;

View File

@@ -1,9 +1,10 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\IpGeolocation;
namespace Shlinkio\Shlink\IpGeolocation\Resolver;
use Shlinkio\Shlink\Common\Exception\WrongIpException;
use Shlinkio\Shlink\IpGeolocation\Model;
interface IpLocationResolverInterface
{