for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of RussianPost SDK package.
*
* © Appwilio (http://appwilio.com), JhaoDa (https://github.com/jhaoda)
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Appwilio\RussianPostSDK\Dispatching\Entities;
use Appwilio\RussianPostSDK\Dispatching\Contracts\Arrayable;
final class Coordinates implements Arrayable
{
/** @var float */
private $latitude;
private $longitude;
public static function create(float $latitude, float $longitude): self
return new self(...\func_get_args());
}
public function __construct(float $latitude, float $longitude)
$this->latitude = $latitude;
$this->longitude = $longitude;
public function getLatitude(): float
return $this->latitude;
public function getLongitude(): float
return $this->longitude;
public function toArray(): array
return [
'latitude' => $this->latitude,
'longitude' => $this->longitude,
];