@@ -15,7 +15,7 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | public function register(Container $app) |
| 17 | 17 | { |
| 18 | - $app['base'] = function ($app) { |
|
| 18 | + $app['base'] = function($app) { |
|
| 19 | 19 | return new Client($app); |
| 20 | 20 | }; |
| 21 | 21 | } |
@@ -178,7 +178,7 @@ |
||
| 178 | 178 | */ |
| 179 | 179 | public static function flatten(array $array, $depth = INF) |
| 180 | 180 | { |
| 181 | - return array_reduce($array, function ($result, $item) use ($depth) { |
|
| 181 | + return array_reduce($array, function($result, $item) use ($depth) { |
|
| 182 | 182 | $item = $item instanceof Collection ? $item->all() : $item; |
| 183 | 183 | |
| 184 | 184 | if (!is_array($item)) { |
@@ -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['extension'] = function ($app) { |
|
| 24 | + $pimple['extension'] = function($app) { |
|
| 25 | 25 | return new Extension($app); |
| 26 | 26 | }; |
| 27 | 27 | } |
@@ -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 | } |