| Total Complexity | 5 |
| Total Lines | 75 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | class Location extends InputMessageContent implements TypeInterface |
||
| 22 | { |
||
| 23 | /** |
||
| 24 | * {@inheritdoc} |
||
| 25 | * |
||
| 26 | * @var array |
||
| 27 | */ |
||
| 28 | static protected $requiredParams = ['latitude', 'longitude']; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * {@inheritdoc} |
||
| 32 | * |
||
| 33 | * @var array |
||
| 34 | */ |
||
| 35 | static protected $map = [ |
||
| 36 | 'latitude' => true, |
||
| 37 | 'longitude' => true |
||
| 38 | ]; |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Latitude of the location in degrees |
||
| 42 | * |
||
| 43 | * @var float |
||
| 44 | */ |
||
| 45 | protected $latitude; |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Longitude of the location in degrees |
||
| 49 | * |
||
| 50 | * @var float |
||
| 51 | */ |
||
| 52 | protected $longitude; |
||
| 53 | |||
| 54 | /** |
||
| 55 | * Location constructor. |
||
| 56 | * @param float $latitude |
||
| 57 | * @param float $longitude |
||
| 58 | */ |
||
| 59 | public function __construct($latitude, $longitude) |
||
| 60 | { |
||
| 61 | $this->latitude = $latitude; |
||
| 62 | $this->longitude = $longitude; |
||
| 63 | } |
||
| 64 | |||
| 65 | |||
| 66 | /** |
||
| 67 | * @return float |
||
| 68 | */ |
||
| 69 | public function getLatitude() |
||
| 72 | } |
||
| 73 | |||
| 74 | /** |
||
| 75 | * @param float $latitude |
||
| 76 | */ |
||
| 77 | public function setLatitude($latitude) |
||
| 78 | { |
||
| 79 | $this->latitude = $latitude; |
||
| 80 | } |
||
| 81 | |||
| 82 | /** |
||
| 83 | * @return float |
||
| 84 | */ |
||
| 85 | public function getLongitude() |
||
| 88 | } |
||
| 89 | |||
| 90 | /** |
||
| 91 | * @param float $longitude |
||
| 92 | */ |
||
| 93 | public function setLongitude($longitude) |
||
| 96 | } |
||
| 97 | } |
||
| 98 |