| Total Complexity | 8 |
| Total Lines | 52 |
| Duplicated Lines | 0 % |
| Coverage | 50% |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class Location |
||
| 10 | { |
||
| 11 | private $latitude; |
||
| 12 | private $longitude; |
||
| 13 | private $parameters; |
||
| 14 | |||
| 15 | 1 | public function __construct(float $latitude, float $longitude, array $parameters = []) |
|
| 16 | { |
||
| 17 | 1 | $this->latitude = $latitude; |
|
| 18 | 1 | $this->longitude = $longitude; |
|
| 19 | 1 | $this->parameters = collect($parameters); |
|
| 20 | 1 | } |
|
| 21 | |||
| 22 | 1 | public static function make(float $latitude, float $longitude, array $parameters = []) |
|
| 23 | { |
||
| 24 | 1 | return new static($latitude, $longitude, $parameters); |
|
| 25 | } |
||
| 26 | |||
| 27 | 1 | public function getLatitude(): float |
|
| 28 | { |
||
| 29 | 1 | return $this->latitude; |
|
| 30 | } |
||
| 31 | |||
| 32 | public function setLatitude(float $latitude): Location |
||
| 33 | { |
||
| 34 | $this->latitude = $latitude; |
||
| 35 | |||
| 36 | return $this; |
||
| 37 | } |
||
| 38 | |||
| 39 | 1 | public function getLongitude(): float |
|
| 40 | { |
||
| 41 | 1 | return $this->longitude; |
|
| 42 | } |
||
| 43 | |||
| 44 | public function setLongitude(float $longitude): Location |
||
| 45 | { |
||
| 46 | $this->longitude = $longitude; |
||
| 47 | |||
| 48 | return $this; |
||
| 49 | } |
||
| 50 | |||
| 51 | public function getParameters(): Collection |
||
| 52 | { |
||
| 53 | return $this->parameters; |
||
| 54 | } |
||
| 55 | |||
| 56 | public function setParameters(array $parameters): Location |
||
| 61 | } |
||
| 62 | } |
||
| 63 |