From 7a859f430b25f188fbf6329f60b8ea3908bc1189 Mon Sep 17 00:00:00 2001 From: LUMASERV Date: Fri, 2 Sep 2016 01:31:51 +0000 Subject: [PATCH] Applied fixes from StyleCI --- src/LUMASERV.php | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/LUMASERV.php b/src/LUMASERV.php index a14a029..5d4819f 100644 --- a/src/LUMASERV.php +++ b/src/LUMASERV.php @@ -83,24 +83,24 @@ private function request($actionPath, $params = [], $method = 'GET') case 'GET': return $this->getHttpClient()->get($url, [ 'verify' => false, - 'query' => $params + 'query' => $params, ]); break; case 'POST': return $this->getHttpClient()->post($url, [ 'verify' => false, - 'body' => $params + 'body' => $params, ]); break; case 'PUT': return $this->getHttpClient()->put($url, [ 'verify' => false, - 'body' => $params + 'body' => $params, ]); case 'DELETE': return $this->getHttpClient()->delete($url, [ 'verify' => false, - 'body' => $params + 'body' => $params, ]); default: throw new MalformedParameterException('Wrong HTTP method passed'); @@ -116,10 +116,11 @@ private function processRequest($response) { $response = $response->getBody()->__toString(); $result = json_decode($response); - if (json_last_error() == JSON_ERROR_NONE) + if (json_last_error() == JSON_ERROR_NONE) { return $result; - else + } else { return $response; + } } public function get($actionPath, $params = []) @@ -160,14 +161,16 @@ public function getAllDomains() return $this->get('domains'); } - public function isDomainAvailable($sld, $tld) { + public function isDomainAvailable($sld, $tld) + { return $this->get('domains/check', [ 'sld' => $sld, - 'tld' => $tld + 'tld' => $tld, ]); } - public function getDomainPrices() { + public function getDomainPrices() + { return $this->get('domains/prices'); } }