mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-11 09:43:13 +08:00
Modernize VisitLocation entity
This commit is contained in:
@@ -154,8 +154,8 @@ class LocateVisitsCommand extends AbstractLockedCommand implements VisitGeolocat
|
||||
|
||||
public function onVisitLocated(VisitLocation $visitLocation, Visit $visit): void
|
||||
{
|
||||
if (! $visitLocation->isEmpty()) {
|
||||
$this->io->writeln(sprintf(' [<info>Address located in "%s"</info>]', $visitLocation->getCountryName()));
|
||||
if (! $visitLocation->isEmpty) {
|
||||
$this->io->writeln(sprintf(' [<info>Address located in "%s"</info>]', $visitLocation->countryName));
|
||||
} elseif ($visit->hasRemoteAddr() && $visit->getRemoteAddr() !== IpAddress::LOCALHOST) {
|
||||
$this->io->writeln(' <comment>[Could not locate address]</comment>');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user