Passed
Pull Request — master (#161)
by
unknown
05:42
created
src/HttpServiceProvider.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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();
@@ -163,15 +163,15 @@  discard block
 block discarded – undo
163 163
      */
164 164
     protected function registerDatabaseDriver()
165 165
     {
166
-        $this->app->extend('db', function ($db) {
167
-            $db->extend('mysql-coroutine', function ($config, $name) {
166
+        $this->app->extend('db', function($db) {
167
+            $db->extend('mysql-coroutine', function($config, $name) {
168 168
                 $config['name'] = $name;
169 169
 
170 170
                 if (isset($config['read'])) {
171 171
                     $config = array_merge($config, $config['read']);
172 172
                 }
173 173
 
174
-                $connectionRead = function () use ($config) {
174
+                $connectionRead = function() use ($config) {
175 175
                     return (new MySqlConnector())->connect($config);
176 176
                 };
177 177
 
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
                     $config = array_merge($config, $config['write']);
180 180
                 }
181 181
 
182
-                $connection = function () use ($config) {
182
+                $connection = function() use ($config) {
183 183
                     return (new MySqlConnector())->connect($config);
184 184
                 };
185 185
 
@@ -200,8 +200,8 @@  discard block
 block discarded – undo
200 200
      */
201 201
     protected function registerSwooleQueueDriver()
202 202
     {
203
-        $this->app->afterResolving('queue', function ($manager) {
204
-            $manager->addConnector('swoole', function () {
203
+        $this->app->afterResolving('queue', function($manager) {
204
+            $manager->addConnector('swoole', function() {
205 205
                 return new SwooleTaskConnector($this->app->make(Server::class));
206 206
             });
207 207
         });
Please login to merge, or discard this patch.