Created tags visits command, with abstract class wrapping common logic for visits lists commands

This commit is contained in:
Alejandro Celaya
2022-05-22 19:22:29 +02:00
parent 358b600713
commit 72e56d271d
11 changed files with 102 additions and 109 deletions

View File

@@ -1,41 +0,0 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\Core\Visit\Model;
final class UnknownVisitLocation implements VisitLocationInterface
{
public function getCountryName(): string
{
return 'Unknown';
}
public function getLatitude(): float
{
return 0.0;
}
public function getLongitude(): float
{
return 0.0;
}
public function getCityName(): string
{
return 'Unknown';
}
public function jsonSerialize(): array
{
return [
'countryCode' => 'Unknown',
'countryName' => 'Unknown',
'regionName' => 'Unknown',
'cityName' => 'Unknown',
'latitude' => 0.0,
'longitude' => 0.0,
'timezone' => 'Unknown',
];
}
}

View File

@@ -1,18 +0,0 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\Core\Visit\Model;
use JsonSerializable;
interface VisitLocationInterface extends JsonSerializable
{
public function getCountryName(): string;
public function getLatitude(): float;
public function getLongitude(): float;
public function getCityName(): string;
}