Skip to content

Commit

Permalink
Apply fixes from StyleCI (#11)
Browse files Browse the repository at this point in the history
Co-authored-by: iMactool <[email protected]>
  • Loading branch information
iMactool and iMactool authored Apr 19, 2021
1 parent fd34de2 commit 3f5bbca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions example/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@

// 删除店铺缓存,一般在
try {
$shopid = 2322; ;
$shopid = 2322;
$result = $servic->Auth->clearShopCache($shopid);
var_export($result);
}catch (Exception $exception){
} catch (Exception $exception) {
var_dump($exception);
}

Expand Down
7 changes: 5 additions & 2 deletions src/Auth/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,14 @@ public function refreshAccessToken($refresh_token)
}

/**
* 清除店铺的 token 缓存
* 清除店铺的 token 缓存.
*
* @param $shopId 授权店铺的id
*/
public function clearShopCache(int $shopId){
public function clearShopCache(int $shopId)
{
$key = 'imactool.shop.access_token.'.$shopId;

return CacheAdapter::getInstance()->delete($key);
}
}

0 comments on commit 3f5bbca

Please sign in to comment.