@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | $options = $config->get('swoole_http.server.options'); |
131 | 131 | |
132 | 132 | // only enable task worker in websocket mode and for queue driver |
133 | - if ($config->get('queue.default') !== 'swoole' && ! $this->isWebsocket) { |
|
133 | + if ($config->get('queue.default') !== 'swoole' && !$this->isWebsocket) { |
|
134 | 134 | unset($config['task_worker_num']); |
135 | 135 | } |
136 | 136 | |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | */ |
145 | 145 | protected function registerServer() |
146 | 146 | { |
147 | - $this->app->singleton(Server::class, function () { |
|
147 | + $this->app->singleton(Server::class, function() { |
|
148 | 148 | if (is_null(static::$server)) { |
149 | 149 | $this->createSwooleServer(); |
150 | 150 | $this->configureSwooleServer(); |
@@ -159,10 +159,10 @@ discard block |
||
159 | 159 | */ |
160 | 160 | protected function registerDatabaseDriver() |
161 | 161 | { |
162 | - $this->app->resolving('db', function ($db) { |
|
163 | - $db->extend('mysql-coroutine', function ($config, $name) { |
|
162 | + $this->app->resolving('db', function($db) { |
|
163 | + $db->extend('mysql-coroutine', function($config, $name) { |
|
164 | 164 | $config['name'] = $name; |
165 | - $connection = function () use ($config) { |
|
165 | + $connection = function() use ($config) { |
|
166 | 166 | return (new MySqlConnector())->connect($config); |
167 | 167 | }; |
168 | 168 | |
@@ -181,8 +181,8 @@ discard block |
||
181 | 181 | */ |
182 | 182 | protected function registerSwooleQueueDriver() |
183 | 183 | { |
184 | - $this->app->afterResolving('queue', function ($manager) { |
|
185 | - $manager->addConnector('swoole', function () { |
|
184 | + $this->app->afterResolving('queue', function($manager) { |
|
185 | + $manager->addConnector('swoole', function() { |
|
186 | 186 | return new SwooleTaskConnector($this->app->make(Server::class)); |
187 | 187 | }); |
188 | 188 | }); |