Passed
Push — master ( cbb991...62e47c )
by Albert
07:16 queued 05:08
created
copy_versioned_files.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-require __DIR__.'/vendor/autoload.php';
3
+require __DIR__ . '/vendor/autoload.php';
4 4
 
5 5
 use SwooleTW\Http\Coroutine\Connectors\ConnectorFactory;
6 6
 use SwooleTW\Http\Helpers\FW;
Please login to merge, or discard this patch.
src/Websocket/Middleware/StartSession.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      */
61 61
     protected function startSession(Request $request)
62 62
     {
63
-        return tap($this->getSession($request), function (Session $session) use ($request) {
63
+        return tap($this->getSession($request), function(Session $session) use ($request) {
64 64
             $session->setRequestOnHandler($request);
65 65
 
66 66
             $session->start();
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
      */
77 77
     public function getSession(Request $request)
78 78
     {
79
-        return tap($this->manager->driver(), function (Session $session) use ($request) {
79
+        return tap($this->manager->driver(), function(Session $session) use ($request) {
80 80
             $session->setId($request->cookies->get($session->getName()));
81 81
         });
82 82
     }
Please login to merge, or discard this patch.
src/LumenServiceProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
      */
17 17
     protected function registerManager()
18 18
     {
19
-        $this->app->singleton(Manager::class, function ($app) {
19
+        $this->app->singleton(Manager::class, function($app) {
20 20
             return new Manager($app, 'lumen');
21 21
         });
22 22
 
@@ -33,11 +33,11 @@  discard block
 block discarded – undo
33 33
         $app = $this->app;
34 34
 
35 35
         if (property_exists($app, 'router')) {
36
-            $app->router->group(['namespace' => 'SwooleTW\Http\Controllers'], function ($app) {
36
+            $app->router->group(['namespace' => 'SwooleTW\Http\Controllers'], function($app) {
37 37
                 require __DIR__ . '/../routes/lumen_routes.php';
38 38
             });
39 39
         } else {
40
-            $app->group(['namespace' => 'App\Http\Controllers'], function ($app) {
40
+            $app->group(['namespace' => 'App\Http\Controllers'], function($app) {
41 41
                 require __DIR__ . '/../routes/lumen_routes.php';
42 42
             });
43 43
         }
Please login to merge, or discard this patch.
src/HttpServiceProvider.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
         $options = $config->get('swoole_http.server.options');
146 146
 
147 147
         // only enable task worker in websocket mode and for queue driver
148
-        if ($config->get('queue.default') !== 'swoole' && ! $this->isWebsocket) {
148
+        if ($config->get('queue.default') !== 'swoole' && !$this->isWebsocket) {
149 149
             unset($config['task_worker_num']);
150 150
         }
151 151
 
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
      */
160 160
     protected function registerServer()
161 161
     {
162
-        $this->app->singleton(Server::class, function () {
162
+        $this->app->singleton(Server::class, function() {
163 163
             if (is_null(static::$server)) {
164 164
                 $this->createSwooleServer();
165 165
                 $this->configureSwooleServer();
@@ -175,8 +175,8 @@  discard block
 block discarded – undo
175 175
      */
176 176
     protected function registerDatabaseDriver()
177 177
     {
178
-        $this->app->extend(DatabaseManager::class, function (DatabaseManager $db) {
179
-            $db->extend('mysql-coroutine', function ($config, $name) {
178
+        $this->app->extend(DatabaseManager::class, function(DatabaseManager $db) {
179
+            $db->extend('mysql-coroutine', function($config, $name) {
180 180
                 $config = $this->getMergedDatabaseConfig($config, $name);
181 181
 
182 182
                 $connection = new MySqlConnection(
@@ -232,8 +232,8 @@  discard block
 block discarded – undo
232 232
      */
233 233
     protected function registerSwooleQueueDriver()
234 234
     {
235
-        $this->app->afterResolving('queue', function (QueueManager $manager) {
236
-            $manager->addConnector('swoole', function () {
235
+        $this->app->afterResolving('queue', function(QueueManager $manager) {
236
+            $manager->addConnector('swoole', function() {
237 237
                 return new SwooleTaskConnector($this->app->make(Server::class));
238 238
             });
239 239
         });
Please login to merge, or discard this patch.
src/Task/SwooleTaskQueue.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      */
55 55
     public function pushRaw($payload, $queue = null, array $options = [])
56 56
     {
57
-        return $this->swoole->task($payload, ! is_numeric($queue) ? -1 : (int)$queue);
57
+        return $this->swoole->task($payload, !is_numeric($queue) ? -1 : (int) $queue);
58 58
     }
59 59
 
60 60
     /**
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      */
70 70
     public function later($delay, $job, $data = '', $queue = null)
71 71
     {
72
-        return Timer::after($this->secondsUntil($delay) * 1000, function () use ($job, $data, $queue) {
72
+        return Timer::after($this->secondsUntil($delay) * 1000, function() use ($job, $data, $queue) {
73 73
             return $this->push($job, $data, $queue);
74 74
         });
75 75
     }
Please login to merge, or discard this patch.
src/Task/QueueFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     public static function make($server, string $version): SwooleTaskQueue
42 42
     {
43 43
         $isMatch = static::isFileVersionMatch($version);
44
-        $class = static::copy(static::stub($version), ! $isMatch);
44
+        $class = static::copy(static::stub($version), !$isMatch);
45 45
 
46 46
         return new $class($server);
47 47
     }
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      */
67 67
     public static function copy(string $stub, bool $rewrite = false): string
68 68
     {
69
-        if (! file_exists(static::QUEUE_CLASS_PATH) || $rewrite) {
69
+        if (!file_exists(static::QUEUE_CLASS_PATH) || $rewrite) {
70 70
             copy($stub, static::QUEUE_CLASS_PATH);
71 71
         }
72 72
 
Please login to merge, or discard this patch.
src/Controllers/SocketIOController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 
12 12
     public function upgrade(Request $request)
13 13
     {
14
-        if (! in_array($request->input('transport'), $this->transports)) {
14
+        if (!in_array($request->input('transport'), $this->transports)) {
15 15
             return response()->json(
16 16
                 [
17 17
                     'code' => 0,
Please login to merge, or discard this patch.
src/Transformers/Request.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
             $key = str_replace('-', '_', $key);
159 159
             $key = strtoupper($key);
160 160
 
161
-            if (! in_array($key, ['REMOTE_ADDR', 'SERVER_PORT', 'HTTPS'])) {
161
+            if (!in_array($key, ['REMOTE_ADDR', 'SERVER_PORT', 'HTTPS'])) {
162 162
                 $key = 'HTTP_' . $key;
163 163
             }
164 164
 
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
             return false;
188 188
         }
189 189
 
190
-        if (! is_file($fileName) || ! filesize($fileName)) {
190
+        if (!is_file($fileName) || !filesize($fileName)) {
191 191
             return false;
192 192
         }
193 193
 
Please login to merge, or discard this patch.
src/Websocket/Push.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -189,7 +189,7 @@
 block discarded – undo
189 189
      */
190 190
     public function isBroadcastToAllDescriptors(): bool
191 191
     {
192
-        return $this->isBroadcast() && ! $this->isAssigned() && count($this->descriptors) > 0;
192
+        return $this->isBroadcast() && !$this->isAssigned() && count($this->descriptors) > 0;
193 193
     }
194 194
 
195 195
     /**
Please login to merge, or discard this patch.