Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
31d29f2460 | ||
|
|
6edbed9dfe | ||
|
|
3c23d5e88d |
@@ -18,7 +18,8 @@
|
|||||||
"symfony/http-client": "^6.1",
|
"symfony/http-client": "^6.1",
|
||||||
"symfony/dependency-injection": "^6.1",
|
"symfony/dependency-injection": "^6.1",
|
||||||
"symfony/framework-bundle": "^6.1",
|
"symfony/framework-bundle": "^6.1",
|
||||||
"symfony/yaml": "^6.1"
|
"symfony/yaml": "^6.1",
|
||||||
|
"doctrine/orm": "^2.13"
|
||||||
},
|
},
|
||||||
|
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace Pcm\GeocodeBundle\Entity\Trait;
|
namespace Pcm\GeocodeBundle\Entity\Trait;
|
||||||
|
|
||||||
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allows an entity to be mapped via latitude and longitude coordinates
|
* Allows an entity to be mapped via latitude and longitude coordinates
|
||||||
*
|
*
|
||||||
@@ -13,8 +15,10 @@ namespace Pcm\GeocodeBundle\Entity\Trait;
|
|||||||
*/
|
*/
|
||||||
trait MappableTrait
|
trait MappableTrait
|
||||||
{
|
{
|
||||||
|
#[ORM\Column(type: 'decimal', precision: 10, scale: 6, nullable: true)]
|
||||||
private ?float $latitude = null;
|
private ?float $latitude = null;
|
||||||
|
|
||||||
|
#[ORM\Column(type: 'decimal', precision: 10, scale: 6, nullable: true)]
|
||||||
private ?float $longitude = null;
|
private ?float $longitude = null;
|
||||||
|
|
||||||
public function getLatitude(): ?float
|
public function getLatitude(): ?float
|
||||||
|
|||||||
@@ -15,11 +15,11 @@ class LatLongModel
|
|||||||
|
|
||||||
public function getLatitude(): float
|
public function getLatitude(): float
|
||||||
{
|
{
|
||||||
return $this->getLatitude();
|
return $this->latitude;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getLongitude(): float
|
public function getLongitude(): float
|
||||||
{
|
{
|
||||||
return $this->getLongitude();
|
return $this->longitude;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user