From df58dbdf08d85f1707f7bd5329356169042e4dd6 Mon Sep 17 00:00:00 2001 From: justmd5 Date: Mon, 25 Jun 2018 13:03:28 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/Core/API.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Core/API.php b/src/Core/API.php index 8c9a63a..0581ba9 100644 --- a/src/Core/API.php +++ b/src/Core/API.php @@ -26,11 +26,11 @@ class API extends AbstractAPI protected $classify; protected $filter; - public function __construct (Signature $signature, $classify, $filter) + public function __construct(Signature $signature, $classify, $filter) { $this->signature = $signature; - $this->classify = $classify; - $this->filter = $filter; + $this->classify = $classify; + $this->filter = $filter; } /** @@ -44,16 +44,16 @@ public function __construct (Signature $signature, $classify, $filter) * * @return array */ - public function request ($method, $params = [], $files = []) + public function request($method, $params = [], $files = []) { $url = sprintf('%s/%s/%s_%s', self::BASE_API, $this->classify, $this->classify, strtolower($method)); if (!collect($this->filter)->has(strtolower($method))) { throw new NotFoundException(sprintf('the url %s can not found!please reaffirm', $url)); } - $http = $this->getHttp(); + $http = $this->getHttp(); $params['sign'] = $this->signature->getReqSign($params); - $response = $files ? $http->upload($url, $params, $files) : $http->post($url, $params); - $result = json_decode(strval($response->getBody()), true); + $response = $files ? $http->upload($url, $params, $files) : $http->post($url, $params); + $result = json_decode(strval($response->getBody()), true); if (isset($result['ret'])) { return $result; } @@ -69,7 +69,7 @@ public function request ($method, $params = [], $files = []) * * @return mixed */ - public function middlewares () + public function middlewares() { } }