@@ -241,13 +241,13 @@ |
||
| 241 | 241 | throw new InvalidArgumentException(sprintf('Class "%s" not an instance of "%s".', $handler, EventHandlerInterface::class)); |
| 242 | 242 | } |
| 243 | 243 | |
| 244 | - return function ($payload) use ($handler) { |
|
| 244 | + return function($payload) use ($handler) { |
|
| 245 | 245 | return (new $handler($this->app ?? null))->handle($payload); |
| 246 | 246 | }; |
| 247 | 247 | } |
| 248 | 248 | |
| 249 | 249 | if ($handler instanceof EventHandlerInterface) { |
| 250 | - return function () use ($handler) { |
|
| 250 | + return function() use ($handler) { |
|
| 251 | 251 | return $handler->handle(...func_get_args()); |
| 252 | 252 | }; |
| 253 | 253 | } |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | */ |
| 22 | 22 | public function register(Container $pimple) |
| 23 | 23 | { |
| 24 | - $pimple['http_client'] = function ($app) { |
|
| 24 | + $pimple['http_client'] = function($app) { |
|
| 25 | 25 | return new Client($app['config']->get('http', [])); |
| 26 | 26 | }; |
| 27 | 27 | } |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | */ |
| 23 | 23 | public function register(Container $pimple) |
| 24 | 24 | { |
| 25 | - $pimple['logger'] = $pimple['log'] = function ($app) { |
|
| 25 | + $pimple['logger'] = $pimple['log'] = function($app) { |
|
| 26 | 26 | $config = $this->formatLogConfig($app); |
| 27 | 27 | |
| 28 | 28 | if (!empty($config)) { |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | */ |
| 22 | 22 | public function register(Container $pimple) |
| 23 | 23 | { |
| 24 | - $pimple['config'] = function ($app) { |
|
| 24 | + $pimple['config'] = function($app) { |
|
| 25 | 25 | return new Config($app->getConfig()); |
| 26 | 26 | }; |
| 27 | 27 | } |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | */ |
| 22 | 22 | public function register(Container $pimple) |
| 23 | 23 | { |
| 24 | - $pimple['events'] = function ($app) { |
|
| 24 | + $pimple['events'] = function($app) { |
|
| 25 | 25 | $dispatcher = new EventDispatcher(); |
| 26 | 26 | |
| 27 | 27 | foreach ($app->config->get('events.listen', []) as $event => $listeners) { |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | */ |
| 22 | 22 | public function register(Container $pimple) |
| 23 | 23 | { |
| 24 | - $pimple['request'] = function () { |
|
| 24 | + $pimple['request'] = function() { |
|
| 25 | 25 | return Request::createFromGlobals(); |
| 26 | 26 | }; |
| 27 | 27 | } |
@@ -206,8 +206,8 @@ discard block |
||
| 206 | 206 | */ |
| 207 | 207 | protected function accessTokenMiddleware() |
| 208 | 208 | { |
| 209 | - return function (callable $handler) { |
|
| 210 | - return function (RequestInterface $request, array $options) use ($handler) { |
|
| 209 | + return function(callable $handler) { |
|
| 210 | + return function(RequestInterface $request, array $options) use ($handler) { |
|
| 211 | 211 | if ($this->accessToken) { |
| 212 | 212 | $request = $this->accessToken->applyToRequest($request, $options); |
| 213 | 213 | } |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | */ |
| 237 | 237 | protected function retryMiddleware() |
| 238 | 238 | { |
| 239 | - return Middleware::retry(function ( |
|
| 239 | + return Middleware::retry(function( |
|
| 240 | 240 | $retries, |
| 241 | 241 | RequestInterface $request, |
| 242 | 242 | ResponseInterface $response = null |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | } |
| 256 | 256 | |
| 257 | 257 | return false; |
| 258 | - }, function () { |
|
| 258 | + }, function() { |
|
| 259 | 259 | return abs($this->app->config->get('http.retry_delay', 500)); |
| 260 | 260 | }); |
| 261 | 261 | } |
@@ -23,19 +23,19 @@ |
||
| 23 | 23 | */ |
| 24 | 24 | public function register(Container $app) |
| 25 | 25 | { |
| 26 | - $app['sns'] = function ($app) { |
|
| 26 | + $app['sns'] = function($app) { |
|
| 27 | 27 | return new Sns($app); |
| 28 | 28 | }; |
| 29 | 29 | |
| 30 | - $app['sns.client'] = function ($app) { |
|
| 30 | + $app['sns.client'] = function($app) { |
|
| 31 | 31 | return new Client($app); |
| 32 | 32 | }; |
| 33 | 33 | |
| 34 | - $app['sns.group'] = function ($app) { |
|
| 34 | + $app['sns.group'] = function($app) { |
|
| 35 | 35 | return new GroupClient($app); |
| 36 | 36 | }; |
| 37 | 37 | |
| 38 | - $app['sns.black_list'] = function ($app) { |
|
| 38 | + $app['sns.black_list'] = function($app) { |
|
| 39 | 39 | return new BlackListClient($app); |
| 40 | 40 | }; |
| 41 | 41 | } |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | */ |
| 19 | 19 | public function register(Container $app) |
| 20 | 20 | { |
| 21 | - $app['account'] = function ($app) { |
|
| 21 | + $app['account'] = function($app) { |
|
| 22 | 22 | return new Client($app); |
| 23 | 23 | }; |
| 24 | 24 | } |