Compare commits

...

3 Commits
0.0.4 ... 0.0.6

Author SHA1 Message Date
Brabli
31d29f2460 Fix broken latlong model 2022-10-17 15:38:10 +01:00
Brabli
6edbed9dfe Add attributes above lat long properties 2022-10-17 12:21:35 +01:00
Brabli
3c23d5e88d Require doctrine orm 2022-10-17 12:21:07 +01:00
3 changed files with 8 additions and 3 deletions

View File

@@ -18,7 +18,8 @@
"symfony/http-client": "^6.1",
"symfony/dependency-injection": "^6.1",
"symfony/framework-bundle": "^6.1",
"symfony/yaml": "^6.1"
"symfony/yaml": "^6.1",
"doctrine/orm": "^2.13"
},
"require-dev": {

View File

@@ -4,6 +4,8 @@ declare(strict_types=1);
namespace Pcm\GeocodeBundle\Entity\Trait;
use Doctrine\ORM\Mapping as ORM;
/**
* Allows an entity to be mapped via latitude and longitude coordinates
*
@@ -13,8 +15,10 @@ namespace Pcm\GeocodeBundle\Entity\Trait;
*/
trait MappableTrait
{
#[ORM\Column(type: 'decimal', precision: 10, scale: 6, nullable: true)]
private ?float $latitude = null;
#[ORM\Column(type: 'decimal', precision: 10, scale: 6, nullable: true)]
private ?float $longitude = null;
public function getLatitude(): ?float

View File

@@ -15,11 +15,11 @@ class LatLongModel
public function getLatitude(): float
{
return $this->getLatitude();
return $this->latitude;
}
public function getLongitude(): float
{
return $this->getLongitude();
return $this->longitude;
}
}