First commit

This commit is contained in:
Brabli
2022-07-19 10:21:40 +01:00
commit 25c87ef115
12 changed files with 379 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
<?php
declare(strict_types=1);
namespace Pcm\GeocodeBundle\Trait;
trait MappableTrait
{
private ?float $latitude = null;
private ?float $longitude = null;
public function getLatitude(): ?float
{
return $this->latitude;
}
public function getLongitude(): ?float
{
return $this->longitude;
}
public function setLatitude(float $lat): self
{
$this->latitude = $lat;
return $this;
}
public function setLongitude(float $lon): self
{
$this->longitude = $lon;
return $this;
}
public function isGeocoded(): bool
{
return $this->getLatitude() && $this->getLongitude();
}
}