@@ -60,7 +60,7 @@ |
||
| 60 | 60 | public function __get($class) |
| 61 | 61 | { |
| 62 | 62 | $class = '\\Abbotton\\DouDian\\Api\\'.Str::ucfirst($class); |
| 63 | - if (! class_exists($class)) { |
|
| 63 | + if (!class_exists($class)) { |
|
| 64 | 64 | throw new Exception($class.', Not found', 404); |
| 65 | 65 | } |
| 66 | 66 | |
@@ -30,11 +30,11 @@ discard block |
||
| 30 | 30 | { |
| 31 | 31 | $this->config = $config; |
| 32 | 32 | $this->shop_id = $shop_id; |
| 33 | - if (! isset($config['app_key']) || ! $config['app_key']) { |
|
| 33 | + if (!isset($config['app_key']) || !$config['app_key']) { |
|
| 34 | 34 | throw new \InvalidArgumentException('配置有误, 请填写app_key'); |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | - if (! isset($config['app_secret']) || ! $config['app_secret']) { |
|
| 37 | + if (!isset($config['app_secret']) || !$config['app_secret']) { |
|
| 38 | 38 | throw new \InvalidArgumentException('配置有误, 请填写app_secret'); |
| 39 | 39 | } |
| 40 | 40 | $this->client = new Client(); |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | private function getAccessToken(): string |
| 134 | 134 | { |
| 135 | 135 | $oauthToken = Cache::get(self::OAUTH_CACHE_KEY.$this->shop_id, []); |
| 136 | - if (! $oauthToken) { |
|
| 136 | + if (!$oauthToken) { |
|
| 137 | 137 | return $this->requestAccessToken(); |
| 138 | 138 | } |
| 139 | 139 | |