| Total Complexity | 2 |
| Total Lines | 47 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | class SendLocationMethod |
||
| 16 | { |
||
| 17 | use FillFromArrayTrait; |
||
| 18 | use SendToChatVariablesTrait; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Latitude of the location. |
||
| 22 | * |
||
| 23 | * @var float |
||
| 24 | */ |
||
| 25 | public $latitude; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Longitude of the location. |
||
| 29 | * |
||
| 30 | * @var float |
||
| 31 | */ |
||
| 32 | public $longitude; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Period in seconds for which the location will be updated (see Live Locations, should be between 60 and 86400. |
||
| 36 | * |
||
| 37 | * @var int|null |
||
| 38 | */ |
||
| 39 | public $livePeriod; |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @param int|string $chatId |
||
| 43 | * @param float $latitude |
||
| 44 | * @param float $longitude |
||
| 45 | * @param array|null $data |
||
| 46 | * |
||
| 47 | * @throws \Greenplugin\TelegramBot\Exception\BadArgumentException |
||
| 48 | * |
||
| 49 | * @return SendLocationMethod |
||
| 50 | */ |
||
| 51 | public static function create($chatId, float $latitude, float $longitude, array $data = null): SendLocationMethod |
||
| 64 |