diff --git a/src/Client.php b/src/Client.php index 15db32e..e4d7f7a 100644 --- a/src/Client.php +++ b/src/Client.php @@ -234,7 +234,7 @@ public function cleanVehicle($vehicle) public function getBalance() { $response = $this->query($this->prepareUri('profile/balance'), [], self::METHOD_GET); - return (double) $response; + return (float) $response; } /** @@ -253,9 +253,9 @@ public function getBalance() protected function query($uri, array $params = [], $method = self::METHOD_POST) { $request = new Request($method, $uri, [ - 'Content-Type' => 'application/json', + 'Content-Type' => 'application/json', 'Authorization' => 'Token ' . $this->token, - 'X-Secret' => $this->secret, + 'X-Secret' => $this->secret, ], 0 < count($params) ? json_encode($params) : null); $response = $this->httpClient->send($request, $this->httpOptions); @@ -316,7 +316,7 @@ protected function populate(AbstractResponse $object, array $data) * @return Party\Party * @throws \ReflectionException */ - protected function populateParty (array $response) + protected function populateParty(array $response) { $management = null; $managementData = $response['data']['management']; @@ -395,7 +395,7 @@ protected function getValueByAnnotatedType(\ReflectionProperty $property, $value public function detectAddressByIp($ip) { $request = new Request('get', $this->baseSuggestionsUrl . 'detectAddressByIp' . '?ip=' . $ip, [ - 'Accept' => 'application/json', + 'Accept' => 'application/json', 'Authorization' => 'Token ' . $this->token, ]);