Decoupled Common module from any other module

This commit is contained in:
Alejandro Celaya
2019-08-11 14:29:22 +02:00
parent 97a362617d
commit cb715c0877
5 changed files with 10 additions and 9 deletions

View File

@@ -6,11 +6,11 @@ namespace Shlinkio\Shlink\Core\Entity;
use Cake\Chronos\Chronos;
use JsonSerializable;
use Shlinkio\Shlink\Common\Entity\AbstractEntity;
use Shlinkio\Shlink\Common\Exception\InvalidArgumentException;
use Shlinkio\Shlink\Common\Util\IpAddress;
use Shlinkio\Shlink\Core\Model\Visitor;
use Shlinkio\Shlink\Core\Visit\Model\UnknownVisitLocation;
use Shlinkio\Shlink\Core\Visit\Model\VisitLocationInterface;
use Shlinkio\Shlink\IpGeolocation\Exception\WrongIpException;
class Visit extends AbstractEntity implements JsonSerializable
{
@@ -45,7 +45,7 @@ class Visit extends AbstractEntity implements JsonSerializable
try {
return (string) IpAddress::fromString($address)->getObfuscatedCopy();
} catch (WrongIpException $e) {
} catch (InvalidArgumentException $e) {
return null;
}
}