Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Flerex committed Jan 25, 2021
2 parents 9f54cac + 7b764ac commit c2da6b2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Dtos/DegreesLocation.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ final class DegreesLocation

public function __construct(float $latitude, float $longitude)
{
$this->latitude = new DegreesCoordinate($latitude, 'N', 'S');
$this->longitude = new DegreesCoordinate($longitude, 'E', 'W');
$this->latitude = new DegreesCoordinate($latitude, 'N', 'S');
$this->longitude = new DegreesCoordinate($longitude, 'E', 'W');
}

public function __toString(): string
{
return $this->latitude . ' ' . $this->longitude;
}
}
5 changes: 5 additions & 0 deletions src/Dtos/Location.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,9 @@ public function toDegrees(): DegreesLocation
{
return new DegreesLocation($this->latitude, $this->longitude);
}

public function __toString(): string
{
return $this->latitude . ", " . $this->longitude;
}
}

0 comments on commit c2da6b2

Please sign in to comment.