Skip to content

Commit

Permalink
add Location getters
Browse files Browse the repository at this point in the history
  • Loading branch information
pavarnos committed Aug 15, 2018
1 parent b7da209 commit 9159946
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
"description": "Send end-to-end-encrypted messages to Threema users using the Threema Gateway.",
"keywords": [
"threema",
"gateway"
"gateway",
"threema-wrapper",
"api-gateway",
"api-wrapper",
"message"
],
"homepage": "https://github.com/pavarnos/threema-msgapi-sdk-php",
"license": "MIT",
Expand Down
26 changes: 21 additions & 5 deletions src/Threema/MsgApi/Message/LocationMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,36 @@ class LocationMessage extends AbstractMessage
private $latitude;

/** @var string */
private $longitute;
private $longitude;

public function __construct(string $latitude, string $longitute)
public function __construct(string $latitude, string $longitude)
{
$this->latitude = $latitude;
$this->longitute = $longitute;
$this->latitude = $latitude;
$this->longitude = $longitude;
}

/**
* @return string
*/
public function getLatitude(): string
{
return $this->latitude;
}

/**
* @return string
*/
public function getLongitude(): string
{
return $this->longitude;
}

/**
* @return string
*/
public function __toString()
{
return 'Location: ' . $this->latitude . ',' . $this->longitute;
return 'Location: ' . $this->latitude . ',' . $this->longitude;
}

/**
Expand Down

0 comments on commit 9159946

Please sign in to comment.