@@ -25,7 +25,7 @@ |
||
25 | 25 | */ |
26 | 26 | public function register(Container $pimple) |
27 | 27 | { |
28 | - isset($pimple['client']) || $pimple['client'] = function ($app) { |
|
28 | + isset($pimple['client']) || $pimple['client'] = function($app) { |
|
29 | 29 | return new Client($app); |
30 | 30 | }; |
31 | 31 | } |
@@ -26,7 +26,7 @@ |
||
26 | 26 | */ |
27 | 27 | public function register(Container $pimple) |
28 | 28 | { |
29 | - $pimple['encryptor'] = function ($app) { |
|
29 | + $pimple['encryptor'] = function($app) { |
|
30 | 30 | return new Encryptor( |
31 | 31 | $app['config']->get('corp_id'), |
32 | 32 | $app['config']->get('token'), |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | |
56 | 56 | return tap(new Response( |
57 | 57 | $this->app['encryptor']->encrypt('success'), 200, ['Content-Type' => 'application/json'] |
58 | - ), function ($response) { |
|
58 | + ), function($response) { |
|
59 | 59 | $this->app['logger']->debug('Response created:', ['content' => $response->getContent()]); |
60 | 60 | }); |
61 | 61 | } |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | public function push($handler) |
73 | 73 | { |
74 | 74 | if (is_string($handler)) { |
75 | - $handler = function ($payload) use ($handler) { |
|
75 | + $handler = function($payload) use ($handler) { |
|
76 | 76 | return (new $handler($this->app))->__invoke($payload); |
77 | 77 | }; |
78 | 78 | } |
@@ -26,7 +26,7 @@ |
||
26 | 26 | */ |
27 | 27 | public function register(Container $pimple) |
28 | 28 | { |
29 | - isset($pimple['logger']) || $pimple['logger'] = function ($app) { |
|
29 | + isset($pimple['logger']) || $pimple['logger'] = function($app) { |
|
30 | 30 | return new Logger('EasyDingTalk'); |
31 | 31 | }; |
32 | 32 | } |
@@ -25,7 +25,7 @@ |
||
25 | 25 | */ |
26 | 26 | public function register(Container $pimple) |
27 | 27 | { |
28 | - $pimple['attendance'] = function ($app) { |
|
28 | + $pimple['attendance'] = function($app) { |
|
29 | 29 | return new Client($app); |
30 | 30 | }; |
31 | 31 | } |
@@ -25,7 +25,7 @@ |
||
25 | 25 | */ |
26 | 26 | public function register(Container $pimple) |
27 | 27 | { |
28 | - $pimple['checkin'] = function ($app) { |
|
28 | + $pimple['checkin'] = function($app) { |
|
29 | 29 | return new Client($app); |
30 | 30 | }; |
31 | 31 | } |
@@ -23,7 +23,7 @@ |
||
23 | 23 | */ |
24 | 24 | protected function makeState() |
25 | 25 | { |
26 | - return tap(str_random(64), function ($state) { |
|
26 | + return tap(str_random(64), function($state) { |
|
27 | 27 | $this->app['request']->getSession()->set('state', $state); |
28 | 28 | }); |
29 | 29 | } |
@@ -26,11 +26,11 @@ |
||
26 | 26 | */ |
27 | 27 | public function register(Container $pimple) |
28 | 28 | { |
29 | - $pimple['sso'] = function ($app) { |
|
29 | + $pimple['sso'] = function($app) { |
|
30 | 30 | return new SsoClient($app); |
31 | 31 | }; |
32 | 32 | |
33 | - $pimple['oauth'] = function ($app) { |
|
33 | + $pimple['oauth'] = function($app) { |
|
34 | 34 | if (!$app['request']->hasSession()) { |
35 | 35 | $app['request']->setSession(new Session()); |
36 | 36 | } |
@@ -75,7 +75,7 @@ |
||
75 | 75 | 'appsecret' => $this->app['config']->get('app_secret'), |
76 | 76 | ]]); |
77 | 77 | |
78 | - return tap($this->castResponseToType($response, 'array'), function ($value) { |
|
78 | + return tap($this->castResponseToType($response, 'array'), function($value) { |
|
79 | 79 | if (0 !== $value['errcode']) { |
80 | 80 | throw new InvalidCredentialsException(json_encode($value)); |
81 | 81 | } |