@@ -23,7 +23,7 @@ |
||
| 23 | 23 | { |
| 24 | 24 | public function register(Container $app) |
| 25 | 25 | { |
| 26 | - $app['attendance'] = function ($app) { |
|
| 26 | + $app['attendance'] = function($app) { |
|
| 27 | 27 | return new Client($app); |
| 28 | 28 | }; |
| 29 | 29 | } |
@@ -23,11 +23,11 @@ |
||
| 23 | 23 | { |
| 24 | 24 | public function register(Container $app) |
| 25 | 25 | { |
| 26 | - $app['message'] = function ($app) { |
|
| 26 | + $app['message'] = function($app) { |
|
| 27 | 27 | return new Client($app); |
| 28 | 28 | }; |
| 29 | 29 | |
| 30 | - $app['async_message'] = function ($app) { |
|
| 30 | + $app['async_message'] = function($app) { |
|
| 31 | 31 | return new AsyncClient($app); |
| 32 | 32 | }; |
| 33 | 33 | } |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | { |
| 24 | 24 | public function register(Container $app) |
| 25 | 25 | { |
| 26 | - $app['report'] = function ($app) { |
|
| 26 | + $app['report'] = function($app) { |
|
| 27 | 27 | return new Client($app); |
| 28 | 28 | }; |
| 29 | 29 | } |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | { |
| 31 | 31 | $protocol = 'http://'; |
| 32 | 32 | |
| 33 | - if (! empty($_SERVER['HTTPS']) || ($_SERVER['HTTP_X_FORWARDED_PROTO'] ?? 'http') === 'https') { |
|
| 33 | + if (!empty($_SERVER['HTTPS']) || ($_SERVER['HTTP_X_FORWARDED_PROTO'] ?? 'http') === 'https') { |
|
| 34 | 34 | $protocol = 'https://'; |
| 35 | 35 | } |
| 36 | 36 | |
@@ -120,11 +120,11 @@ discard block |
||
| 120 | 120 | */ |
| 121 | 121 | protected function requestDingTalk($method, $uri, array $options = []) |
| 122 | 122 | { |
| 123 | - if (! $handler = $this->dingtalkHandlerStack) { |
|
| 123 | + if (!$handler = $this->dingtalkHandlerStack) { |
|
| 124 | 124 | $handler = HandlerStack::create(); |
| 125 | 125 | |
| 126 | - $handler->push(function (callable $handler) { |
|
| 127 | - return function (RequestInterface $request, array $options) use ($handler) { |
|
| 126 | + $handler->push(function(callable $handler) { |
|
| 127 | + return function(RequestInterface $request, array $options) use ($handler) { |
|
| 128 | 128 | return $handler($this->concat($request, ['access_token' => $this->app['credential']->token()]), $options); |
| 129 | 129 | }; |
| 130 | 130 | }); |
@@ -143,10 +143,10 @@ discard block |
||
| 143 | 143 | */ |
| 144 | 144 | protected function requestTaobao($method, array $options = []) |
| 145 | 145 | { |
| 146 | - if (! $handler = $this->taobaoHandlerStack) { |
|
| 146 | + if (!$handler = $this->taobaoHandlerStack) { |
|
| 147 | 147 | $handler = HandlerStack::create(); |
| 148 | - $handler->push(function (callable $handler) { |
|
| 149 | - return function (RequestInterface $request, array $options) use ($handler) { |
|
| 148 | + $handler->push(function(callable $handler) { |
|
| 149 | + return function(RequestInterface $request, array $options) use ($handler) { |
|
| 150 | 150 | $query = [ |
| 151 | 151 | 'session' => $this->app['credential']->token(), |
| 152 | 152 | 'timestamp' => date('Y-m-d H:i:s'), |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | */ |
| 31 | 31 | public function listLabelGroups(int $size = 20, int $offset = 0) |
| 32 | 32 | { |
| 33 | - return $this->httpPostJson('topapi/extcontact/listlabelgroups',['size' => $size ,'offset' => $offset]); |
|
| 33 | + return $this->httpPostJson('topapi/extcontact/listlabelgroups', ['size' => $size, 'offset' => $offset]); |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | /** |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | */ |
| 44 | 44 | public function list(int $size = 20, int $offset = 0) |
| 45 | 45 | { |
| 46 | - return $this->httpPostJson('topapi/extcontact/list', ['size' => $size ,'offset' => $offset]); |
|
| 46 | + return $this->httpPostJson('topapi/extcontact/list', ['size' => $size, 'offset' => $offset]); |
|
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | /** |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | { |
| 24 | 24 | public function register(Container $app) |
| 25 | 25 | { |
| 26 | - $app['extcontact'] = function ($app) { |
|
| 26 | + $app['extcontact'] = function($app) { |
|
| 27 | 27 | return new Client($app); |
| 28 | 28 | }; |
| 29 | 29 | } |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | { |
| 24 | 24 | public function register(Container $app) |
| 25 | 25 | { |
| 26 | - $app['microapp'] = function ($app) { |
|
| 26 | + $app['microapp'] = function($app) { |
|
| 27 | 27 | return new Client($app); |
| 28 | 28 | }; |
| 29 | 29 | } |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | { |
| 24 | 24 | public function register(Container $app) |
| 25 | 25 | { |
| 26 | - $app['process'] = function ($app) { |
|
| 26 | + $app['process'] = function($app) { |
|
| 27 | 27 | return new Client($app); |
| 28 | 28 | }; |
| 29 | 29 | } |