Skip to content

Commit aca96fe

Browse files
committed
Apply fixes from StyleCI
1 parent c7b52ba commit aca96fe

File tree

5 files changed

+18
-17
lines changed

5 files changed

+18
-17
lines changed

src/CacheBridge.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function save($id, $data, $lifeTime = 0)
5252
if ($lifeTime == 0) {
5353
return Cache::forever($id, $data);
5454
}
55-
55+
5656
return Cache::put($id, $data, $lifeTime / 60);
5757
}
5858

src/Events/WeChatUserAuthorized.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
namespace Freyo\LaravelEntWechat\Events;
44

5-
use Illuminate\Queue\SerializesModels;
65
use EntWeChat\Support\Collection;
6+
use Illuminate\Queue\SerializesModels;
77

88
class WeChatUserAuthorized
99
{
@@ -16,7 +16,7 @@ class WeChatUserAuthorized
1616
* Create a new event instance.
1717
*
1818
* @param \EntWeChat\Support\Collection $user
19-
* @param bool $isNewSession
19+
* @param bool $isNewSession
2020
*
2121
* @return void
2222
*/

src/Middleware/OAuthAuthenticate.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
use Closure;
66
use EntWeChat\Foundation\Application;
77
use Event;
8-
use Log;
98
use Freyo\LaravelEntWechat\Events\WeChatUserAuthorized;
9+
use Log;
1010

1111
/**
1212
* Class OAuthAuthenticate.
@@ -96,19 +96,20 @@ protected function getTargetUrl($request)
9696
/**
9797
* Is different scopes.
9898
*
99-
* @param array $scopes
99+
* @param array $scopes
100100
*
101101
* @return bool
102102
*/
103103
protected function needReauth($scopes)
104104
{
105-
return session('entwechat.oauth_user.original.scope') == 'snsapi_base' && in_array("snsapi_userinfo", $scopes);
105+
return session('entwechat.oauth_user.original.scope') == 'snsapi_base' && in_array('snsapi_userinfo', $scopes);
106106
}
107107

108108
/**
109109
* Detect current user agent type.
110110
*
111111
* @param \Illuminate\Http\Request $request
112+
*
112113
* @return bool
113114
*/
114115
protected function isWeChatBrowser($request)

src/ServiceProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function boot()
3333
*/
3434
protected function setupConfig()
3535
{
36-
$source = realpath(__DIR__ . '/config.php');
36+
$source = realpath(__DIR__.'/config.php');
3737

3838
if ($this->app instanceof LaravelApplication) {
3939
if ($this->app->runningInConsole()) {
@@ -77,7 +77,7 @@ public function provides()
7777
}
7878

7979
/**
80-
* Get config value by key
80+
* Get config value by key.
8181
*
8282
* @return \Illuminate\Config\Repository
8383
*/

src/config.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919

2020
//单账号
2121
'corp_id' => env('WECHAT_APPID', 'your-app-id'), // AppID
22-
'secret' => env('WECHAT_SECRET', 'your-app-secret'), // AppSecret
23-
'token' => env('WECHAT_TOKEN', 'your-token'), // Token
22+
'secret' => env('WECHAT_SECRET', 'your-app-secret'), // AppSecret
23+
'token' => env('WECHAT_TOKEN', 'your-token'), // Token
2424
'aes_key' => env('WECHAT_AES_KEY', ''), // EncodingAESKey
2525
/*
2626
* OAuth 配置
@@ -31,16 +31,16 @@
3131
*/
3232
'oauth' => [
3333
'only_wechat_browser' => false,
34-
'scopes' => array_map('trim', explode(',', env('WECHAT_OAUTH_SCOPES', 'snsapi_base'))),
35-
'callback' => env('WECHAT_OAUTH_CALLBACK', '/examples/oauth_callback.php'),
34+
'scopes' => array_map('trim', explode(',', env('WECHAT_OAUTH_SCOPES', 'snsapi_base'))),
35+
'callback' => env('WECHAT_OAUTH_CALLBACK', '/examples/oauth_callback.php'),
3636
],
3737

3838
//多账号
3939
'account' => [
4040
'default' => [
4141
'corp_id' => env('WECHAT_APPID', 'your-app-id'), // AppID
42-
'secret' => env('WECHAT_SECRET', 'your-app-secret'), // AppSecret
43-
'token' => env('WECHAT_TOKEN', 'your-token'), // Token
42+
'secret' => env('WECHAT_SECRET', 'your-app-secret'), // AppSecret
43+
'token' => env('WECHAT_TOKEN', 'your-token'), // Token
4444
'aes_key' => env('WECHAT_AES_KEY', ''), // EncodingAESKey
4545
/*
4646
* OAuth 配置
@@ -51,8 +51,8 @@
5151
*/
5252
'oauth' => [
5353
'only_wechat_browser' => false,
54-
'scopes' => array_map('trim', explode(',', env('WECHAT_OAUTH_SCOPES', 'snsapi_base'))),
55-
'callback' => env('WECHAT_OAUTH_CALLBACK', '/examples/oauth_callback.php'),
54+
'scopes' => array_map('trim', explode(',', env('WECHAT_OAUTH_SCOPES', 'snsapi_base'))),
55+
'callback' => env('WECHAT_OAUTH_CALLBACK', '/examples/oauth_callback.php'),
5656
],
5757
],
5858
// ...
@@ -67,7 +67,7 @@
6767
*/
6868
'log' => [
6969
'level' => env('WECHAT_LOG_LEVEL', 'debug'),
70-
'file' => env('WECHAT_LOG_FILE', storage_path('logs/wechat.log')),
70+
'file' => env('WECHAT_LOG_FILE', storage_path('logs/wechat.log')),
7171
],
7272

7373
/*

0 commit comments

Comments
 (0)