@@ -78,7 +78,7 @@  | 
                                                    ||
| 78 | 78 | 'headers' => [  | 
                                                        
| 79 | 79 | 'User-Agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36',  | 
                                                        
| 80 | 80 | ],  | 
                                                        
| 81 | - 'cookies' => new CookieJar(false, isset($this->userConfig['cookies']['cookieJar'])?$this->userConfig['cookies']['cookieJar']:[]),  | 
                                                        |
| 81 | + 'cookies' => new CookieJar(false, isset($this->userConfig['cookies']['cookieJar']) ? $this->userConfig['cookies']['cookieJar'] : []),  | 
                                                        |
| 82 | 82 | ],  | 
                                                        
| 83 | 83 | ];  | 
                                                        
| 84 | 84 | |
@@ -10,7 +10,7 @@  | 
                                                    ||
| 10 | 10 | use JinWechat\Kernel\Traits\HasHttpRequests;  | 
                                                        
| 11 | 11 | use JinWechat\Kernel\Traits\InteractsWithCache;  | 
                                                        
| 12 | 12 | use JinWechat\Kernel\Exceptions\HttpException;  | 
                                                        
| 13 | -class Token implements TokenInterface{ | 
                                                        |
| 13 | +class Token implements TokenInterface { | 
                                                        |
| 14 | 14 | use HasHttpRequests, InteractsWithCache;  | 
                                                        
| 15 | 15 | |
| 16 | 16 | protected $app;  | 
                                                        
@@ -161,7 +161,7 @@ discard block  | 
                                                    ||
| 161 | 161 | |
| 162 | 162 | $response = $this->performRequest($url, $method, $options);  | 
                                                        
| 163 | 163 | //保存Token todo::改为缓存  | 
                                                        
| 164 | -        if (preg_match('/cgi-bin\/bizlogin?action=startlogin/',$url,$urlMatch)){ | 
                                                        |
| 164 | +        if (preg_match('/cgi-bin\/bizlogin?action=startlogin/', $url, $urlMatch)) { | 
                                                        |
| 165 | 165 |              if (preg_match('/token=([\d]+)/i', $response['redirect_url'], $match)) { | 
                                                        
| 166 | 166 | $this->token = $match[1];  | 
                                                        
| 167 | 167 | }  | 
                                                        
@@ -215,8 +215,8 @@ discard block  | 
                                                    ||
| 215 | 215 | */  | 
                                                        
| 216 | 216 | function headerMiddleware($header, $value)  | 
                                                        
| 217 | 217 |      { | 
                                                        
| 218 | -        return function (callable $handler) use ($header, $value) { | 
                                                        |
| 219 | - return function (  | 
                                                        |
| 218 | +        return function(callable $handler) use ($header, $value) { | 
                                                        |
| 219 | + return function(  | 
                                                        |
| 220 | 220 | RequestInterface $request,  | 
                                                        
| 221 | 221 | array $options  | 
                                                        
| 222 | 222 |              ) use ($handler, $header, $value) { | 
                                                        
@@ -6,11 +6,11 @@  | 
                                                    ||
| 6 | 6 | namespace JinWechat\Kernel\Contracts;  | 
                                                        
| 7 | 7 | |
| 8 | 8 | use Psr\Http\Message\RequestInterface;  | 
                                                        
| 9 | -interface TokenInterface{ | 
                                                        |
| 9 | +interface TokenInterface { | 
                                                        |
| 10 | 10 | /**  | 
                                                        
| 11 | 11 | * @return array  | 
                                                        
| 12 | 12 | */  | 
                                                        
| 13 | - public function getToken():array ;  | 
                                                        |
| 13 | + public function getToken():array;  | 
                                                        |
| 14 | 14 | |
| 15 | 15 | /**  | 
                                                        
| 16 | 16 | * @param RequestInterface $request  |