Update geo coordinates to use readonly properties rather than getters
This commit is contained in:
@@ -5,22 +5,12 @@ declare(strict_types=1);
|
||||
namespace Pcm\GeocodeBundle\Model;
|
||||
|
||||
/**
|
||||
* A model for accessing latitude and longitude values
|
||||
* A model for accessing latitude and longitude values.
|
||||
*
|
||||
* @package Pcm\GeocodeBundle
|
||||
*/
|
||||
final class GeoCoordinates
|
||||
{
|
||||
public function __construct(private float $latitude, private float $longitude) {}
|
||||
|
||||
public function getLatitude(): float
|
||||
{
|
||||
return $this->latitude;
|
||||
}
|
||||
|
||||
public function getLongitude(): float
|
||||
{
|
||||
return $this->longitude;
|
||||
}
|
||||
public function __construct(readonly public float $latitude, readonly public float $longitude) {}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user