合并分支 'master' 到 'v1.0.3'
fix 查看合并请求 !4
正在显示
1 个修改的文件
包含
10 行增加
和
8 行删除
| @@ -33,9 +33,9 @@ class TiktokShop | @@ -33,9 +33,9 @@ class TiktokShop | ||
| 33 | * @var array|string[] | 33 | * @var array|string[] |
| 34 | */ | 34 | */ |
| 35 | protected static array $passages = [ | 35 | protected static array $passages = [ |
| 36 | - 'order' => Passage\Order\Order::class, | 36 | + 'order' => Passage\Order\Order::class, |
| 37 | 'shop' => Passage\Shop\Shop::class, | 37 | 'shop' => Passage\Shop\Shop::class, |
| 38 | - 'product' => Passage\Product\Product::class, | 38 | + 'product' => Passage\Product\Product::class, |
| 39 | 'authorize' => Authorize::class, | 39 | 'authorize' => Authorize::class, |
| 40 | 'verify' => Verify::class, | 40 | 'verify' => Verify::class, |
| 41 | 'alliance' => Alliance::class, | 41 | 'alliance' => Alliance::class, |
| @@ -55,7 +55,7 @@ class TiktokShop | @@ -55,7 +55,7 @@ class TiktokShop | ||
| 55 | 55 | ||
| 56 | $app = $options ?: 'default'; | 56 | $app = $options ?: 'default'; |
| 57 | 57 | ||
| 58 | - $config = \config(TiktokShopProvider::$name.'.'.$app); | 58 | + $config = \config(TiktokShopProvider::$name . '.' . $app); |
| 59 | 59 | ||
| 60 | if (!is_array($config)) { | 60 | if (!is_array($config)) { |
| 61 | throw new \InvalidArgumentException('config file not found'); | 61 | throw new \InvalidArgumentException('config file not found'); |
| @@ -69,7 +69,7 @@ class TiktokShop | @@ -69,7 +69,7 @@ class TiktokShop | ||
| 69 | } | 69 | } |
| 70 | 70 | ||
| 71 | /** | 71 | /** |
| 72 | - * @param array $options | 72 | + * @param array $options |
| 73 | * | 73 | * |
| 74 | * @return Config | 74 | * @return Config |
| 75 | */ | 75 | */ |
| @@ -79,7 +79,7 @@ class TiktokShop | @@ -79,7 +79,7 @@ class TiktokShop | ||
| 79 | Arr::get($options, 'app_key'), | 79 | Arr::get($options, 'app_key'), |
| 80 | Arr::get($options, 'app_secret'), | 80 | Arr::get($options, 'app_secret'), |
| 81 | Arr::get($options, 'base_uri'), | 81 | Arr::get($options, 'base_uri'), |
| 82 | - (float) Arr::get($options, 'timeout'), | 82 | + (float)Arr::get($options, 'timeout'), |
| 83 | Arr::get($options, 'enable_mock') | 83 | Arr::get($options, 'enable_mock') |
| 84 | ); | 84 | ); |
| 85 | } | 85 | } |
| @@ -95,7 +95,7 @@ class TiktokShop | @@ -95,7 +95,7 @@ class TiktokShop | ||
| 95 | } | 95 | } |
| 96 | 96 | ||
| 97 | /** | 97 | /** |
| 98 | - * @param string $accessToken | 98 | + * @param string $accessToken |
| 99 | * | 99 | * |
| 100 | * @return $this | 100 | * @return $this |
| 101 | */ | 101 | */ |
| @@ -108,7 +108,7 @@ class TiktokShop | @@ -108,7 +108,7 @@ class TiktokShop | ||
| 108 | 108 | ||
| 109 | /** | 109 | /** |
| 110 | * @param $name | 110 | * @param $name |
| 111 | - * @param array $arguments | 111 | + * @param array $arguments |
| 112 | * | 112 | * |
| 113 | * @return PassageProxy | 113 | * @return PassageProxy |
| 114 | */ | 114 | */ |
| @@ -119,7 +119,9 @@ class TiktokShop | @@ -119,7 +119,9 @@ class TiktokShop | ||
| 119 | try { | 119 | try { |
| 120 | return PassageProxy::proxy($passage, $this->config); | 120 | return PassageProxy::proxy($passage, $this->config); |
| 121 | } finally { | 121 | } finally { |
| 122 | - $this->config->setAccessToken(''); | 122 | + register_shutdown_function(function () { |
| 123 | + $this->config->setAccessToken(''); | ||
| 124 | + }); | ||
| 123 | } | 125 | } |
| 124 | } | 126 | } |
| 125 | } | 127 | } |
-
请 注册 或 登录 后发表评论