Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
justmd5 authored and StyleCIBot committed Jun 25, 2018
1 parent bb87f54 commit df58dbd
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/Core/API.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand All @@ -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;
}
Expand All @@ -69,7 +69,7 @@ public function request ($method, $params = [], $files = [])
*
* @return mixed
*/
public function middlewares ()
public function middlewares()
{
}
}

0 comments on commit df58dbd

Please sign in to comment.