mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-06 23:33:13 +08:00
Added tests for new cases with non-locatable addresses
This commit is contained in:
@@ -72,4 +72,16 @@ class VisitLocation extends AbstractEntity implements VisitLocationInterface
|
||||
'timezone' => $this->timezone,
|
||||
];
|
||||
}
|
||||
|
||||
public function isEmpty(): bool
|
||||
{
|
||||
return
|
||||
$this->countryCode === '' &&
|
||||
$this->countryName === '' &&
|
||||
$this->regionName === '' &&
|
||||
$this->cityName === '' &&
|
||||
((float) $this->latitude) === 0.0 &&
|
||||
((float) $this->longitude) === 0.0 &&
|
||||
$this->timezone === '';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user