@@ -16,7 +16,7 @@ |
||
| 16 | 16 | { |
| 17 | 17 | public function register(Container $pimple) |
| 18 | 18 | { |
| 19 | - $pimple['http_client'] = function ($app) { |
|
| 19 | + $pimple['http_client'] = function($app) { |
|
| 20 | 20 | return new Client($app['config']->get('http', [])); |
| 21 | 21 | }; |
| 22 | 22 | } |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | { |
| 17 | 17 | public function register(Container $pimple) |
| 18 | 18 | { |
| 19 | - $pimple['logger'] = $pimple['log'] = function ($app) { |
|
| 19 | + $pimple['logger'] = $pimple['log'] = function($app) { |
|
| 20 | 20 | $config = $this->formatLogConfig($app); |
| 21 | 21 | |
| 22 | 22 | if (!empty($config)) { |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | { |
| 17 | 17 | public function register(Container $pimple) |
| 18 | 18 | { |
| 19 | - $pimple['config'] = function ($app) { |
|
| 19 | + $pimple['config'] = function($app) { |
|
| 20 | 20 | return new Config($app->getConfig()); |
| 21 | 21 | }; |
| 22 | 22 | } |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | { |
| 17 | 17 | public function register(Container $pimple) |
| 18 | 18 | { |
| 19 | - $pimple['extension'] = function ($app) { |
|
| 19 | + $pimple['extension'] = function($app) { |
|
| 20 | 20 | return new Extension($app); |
| 21 | 21 | }; |
| 22 | 22 | } |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | { |
| 17 | 17 | public function register(Container $pimple) |
| 18 | 18 | { |
| 19 | - $pimple['request'] = function () { |
|
| 19 | + $pimple['request'] = function() { |
|
| 20 | 20 | return Request::createFromGlobals(); |
| 21 | 21 | }; |
| 22 | 22 | } |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | return $this->callCustomCreator($config); |
| 105 | 105 | } |
| 106 | 106 | |
| 107 | - $driverMethod = 'create' . ucfirst($config['driver']) . 'Driver'; |
|
| 107 | + $driverMethod = 'create'.ucfirst($config['driver']).'Driver'; |
|
| 108 | 108 | |
| 109 | 109 | if (method_exists($this, $driverMethod)) { |
| 110 | 110 | return $this->{$driverMethod}($config); |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | protected function createEmergencyLogger() |
| 121 | 121 | { |
| 122 | 122 | return new Monolog('AplisinDingTalk', $this->prepareHandlers([ |
| 123 | - new StreamHandler(\sys_get_temp_dir() . '/dingtalk/dingtalk.log', $this->level(['level' => 'debug'])) |
|
| 123 | + new StreamHandler(\sys_get_temp_dir().'/dingtalk/dingtalk.log', $this->level(['level' => 'debug'])) |
|
| 124 | 124 | ])); |
| 125 | 125 | } |
| 126 | 126 | |
@@ -91,7 +91,7 @@ |
||
| 91 | 91 | |
| 92 | 92 | public static function flatten(array $array, $depth = INF) |
| 93 | 93 | { |
| 94 | - return array_reduce($array, function ($result, $item) use ($depth) { |
|
| 94 | + return array_reduce($array, function($result, $item) use ($depth) { |
|
| 95 | 95 | $item = $item instanceof Collection ? $item->all() : $item; |
| 96 | 96 | if (!is_array($item)) { |
| 97 | 97 | return array_merge($result, [$item]); |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | { |
| 16 | 16 | public function register(Container $app) |
| 17 | 17 | { |
| 18 | - isset($app['access_token']) || $app['access_token'] = function ($app) { |
|
| 18 | + isset($app['access_token']) || $app['access_token'] = function($app) { |
|
| 19 | 19 | return new AccessToken($app); |
| 20 | 20 | }; |
| 21 | 21 | } |