Skip to content

Commit 84f4650

Browse files
authored
Merge pull request #38 from overtrue/analysis-qvZJWO
Applied fixes from StyleCI
2 parents 08a06df + 2610766 commit 84f4650

File tree

6 files changed

+27
-27
lines changed

6 files changed

+27
-27
lines changed

src/CacheBridge.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/**
99
* Cache bridge for laravel.
1010
*/
11-
class CacheBridge implements CacheInterface
11+
class CacheBridge implements CacheInterface
1212
{
1313
/**
1414
* Fetches an entry from the cache.
@@ -17,7 +17,7 @@ class CacheBridge implements CacheInterface
1717
*
1818
* @return mixed The cached data or FALSE, if no cache entry exists for the given id.
1919
*/
20-
public function fetch($id)
20+
public function fetch($id)
2121
{
2222
return Cache::get($id);
2323
}
@@ -70,8 +70,7 @@ public function delete($id)
7070
*
7171
* @return array|null An associative array with server's statistics if available, NULL otherwise.
7272
*/
73-
public function getStats()
73+
public function getStats()
7474
{
75-
return null;
7675
}
77-
}
76+
}

src/Events/WeChatUserAuthorized.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
namespace Overtrue\LaravelWechat\Events;
44

55
use App\Events\Event;
6-
use Overtrue\Socialite\User;
76
use Illuminate\Queue\SerializesModels;
8-
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
7+
use Overtrue\Socialite\User;
98

109
class WeChatUserAuthorized extends Event
1110
{

src/Facade.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
<?php
2+
23
namespace Overtrue\LaravelWechat;
34

45
use Illuminate\Support\Facades\Facade as LaravelFacade;
56

67
class Facade extends LaravelFacade
78
{
89
/**
9-
* 默认为 Server
10+
* 默认为 Server.
1011
*
1112
* @return string
1213
*/
13-
static public function getFacadeAccessor()
14+
public static function getFacadeAccessor()
1415
{
1516
return 'wechat';
1617
}
@@ -23,7 +24,7 @@ static public function getFacadeAccessor()
2324
*
2425
* @return mixed
2526
*/
26-
static public function __callStatic($name, $args)
27+
public static function __callStatic($name, $args)
2728
{
2829
$app = static::getFacadeRoot();
2930

src/Middleware/OAuthAuthenticate.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,17 @@
77
use Overtrue\LaravelWechat\Events\WeChatUserAuthorized;
88

99
/**
10-
* Class OAuthAuthenticate
10+
* Class OAuthAuthenticate.
1111
*/
1212
class OAuthAuthenticate
1313
{
1414
/**
1515
* Handle an incoming request.
1616
*
17-
* @param \Illuminate\Http\Request $request
18-
* @param \Closure $next
19-
* @param string|null $guard
17+
* @param \Illuminate\Http\Request $request
18+
* @param \Closure $next
19+
* @param string|null $guard
20+
*
2021
* @return mixed
2122
*/
2223
public function handle($request, Closure $next, $guard = null)

src/ServiceProvider.php

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

33
namespace Overtrue\LaravelWechat;
44

5-
use Illuminate\Support\ServiceProvider as LaravelServiceProvider;
65
use EasyWeChat\Foundation\Application;
76
use Illuminate\Foundation\Application as LaravelApplication;
7+
use Illuminate\Support\ServiceProvider as LaravelServiceProvider;
88
use Laravel\Lumen\Application as LumenApplication;
99

1010
class ServiceProvider extends LaravelServiceProvider
1111
{
1212
/**
13-
* 延迟加载
13+
* 延迟加载.
1414
*
15-
* @var boolean
15+
* @var bool
1616
*/
1717
protected $defer = true;
1818

@@ -33,11 +33,11 @@ public function boot()
3333
*/
3434
protected function setupConfig()
3535
{
36-
$source = realpath(__DIR__ . '/config.php');
37-
36+
$source = realpath(__DIR__.'/config.php');
37+
3838
if ($this->app instanceof LaravelApplication && $this->app->runningInConsole()) {
3939
$this->publishes([
40-
$source => config_path('wechat.php')
40+
$source => config_path('wechat.php'),
4141
]);
4242
} elseif ($this->app instanceof LumenApplication) {
4343
$this->app->configure('wechat');
@@ -52,7 +52,7 @@ protected function setupConfig()
5252
*/
5353
public function register()
5454
{
55-
$this->app->singleton(['EasyWeChat\\Foundation\\Application' => 'wechat'], function($app){
55+
$this->app->singleton(['EasyWeChat\\Foundation\\Application' => 'wechat'], function ($app) {
5656
$app = new Application(config('wechat'));
5757

5858
if (config('wechat.use_laravel_cache')) {

src/config.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
<?php
22

33
return [
4-
/**
4+
/*
55
* Debug 模式,bool 值:true/false
66
*
77
* 当值为 false 时,所有的日志都不会记录
88
*/
99
'debug' => true,
1010

11-
/**
11+
/*
1212
* 使用 Laravel 的缓存系统
1313
*/
1414
'use_laravel_cache' => true,
1515

16-
/**
16+
/*
1717
* 账号基本信息,请从微信公众平台/开放平台获取
1818
*/
1919
'app_id' => env('WECHAT_APPID', 'your-app-id'), // AppID
2020
'secret' => env('WECHAT_SECRET', 'your-app-secret'), // AppSecret
2121
'token' => env('WECHAT_TOKEN', 'your-token'), // Token
2222
'aes_key' => env('WECHAT_AES_KEY', ''), // EncodingAESKey
2323

24-
/**
24+
/*
2525
* 日志配置
2626
*
2727
* level: 日志级别,可选为:
@@ -33,7 +33,7 @@
3333
'file' => env('WECHAT_LOG_FILE', storage_path('logs/wechat.log')),
3434
],
3535

36-
/**
36+
/*
3737
* OAuth 配置
3838
*
3939
* scopes:公众平台(snsapi_userinfo / snsapi_base),开放平台:snsapi_login
@@ -44,7 +44,7 @@
4444
// 'callback' => env('WECHAT_OAUTH_CALLBACK', '/examples/oauth_callback.php'),
4545
// ],
4646

47-
/**
47+
/*
4848
* 微信支付
4949
*/
5050
// 'payment' => [

0 commit comments

Comments
 (0)