Completed
Pull Request — master (#230)
by Albert
04:30
created
src/Concerns/InteractsWithSwooleTable.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,8 +56,8 @@
 block discarded – undo
56 56
      */
57 57
     protected function bindSwooleTable()
58 58
     {
59
-        if (! $this->app instanceof ConsoleApp) {
60
-            $this->app->singleton(SwooleTable::class, function () {
59
+        if (!$this->app instanceof ConsoleApp) {
60
+            $this->app->singleton(SwooleTable::class, function() {
61 61
                 return $this->currentTable;
62 62
             });
63 63
 
Please login to merge, or discard this patch.
src/Commands/HttpServerCommand.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
     {
134 134
         $pid = $this->getCurrentPid();
135 135
 
136
-        if (! $this->isRunning($pid)) {
136
+        if (!$this->isRunning($pid)) {
137 137
             $this->error("Failed! There is no swoole_http_server process running.");
138 138
 
139 139
             return;
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
     {
178 178
         $pid = $this->getCurrentPid();
179 179
 
180
-        if (! $this->isRunning($pid)) {
180
+        if (!$this->isRunning($pid)) {
181 181
             $this->error("Failed! There is no swoole_http_server process running.");
182 182
 
183 183
             return;
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 
188 188
         $isRunning = $this->killProcess($pid, SIGUSR1);
189 189
 
190
-        if (! $isRunning) {
190
+        if (!$isRunning) {
191 191
             $this->error('> failure');
192 192
 
193 193
             return;
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
     {
245 245
         $this->action = $this->argument('action');
246 246
 
247
-        if (! in_array($this->action, ['start', 'stop', 'restart', 'reload', 'infos'], true)) {
247
+        if (!in_array($this->action, ['start', 'stop', 'restart', 'reload', 'infos'], true)) {
248 248
             $this->error(
249 249
                 "Invalid argument '{$this->action}'. Expected 'start', 'stop', 'restart', 'reload' or 'infos'."
250 250
             );
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
         $filter = Arr::get($this->config, 'hot_reload.filter');
266 266
         $log = Arr::get($this->config, 'hot_reload.log');
267 267
 
268
-        $cb = function (FSEvent $event) use ($server, $log) {
268
+        $cb = function(FSEvent $event) use ($server, $log) {
269 269
             $log ? $this->info(FSOutput::format($event)) : null;
270 270
             $server->reload();
271 271
         };
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
      */
283 283
     protected function isRunning($pid)
284 284
     {
285
-        if (! $pid) {
285
+        if (!$pid) {
286 286
             return false;
287 287
         }
288 288
 
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
             $start = time();
311 311
 
312 312
             do {
313
-                if (! $this->isRunning($pid)) {
313
+                if (!$this->isRunning($pid)) {
314 314
                     break;
315 315
                 }
316 316
 
@@ -378,13 +378,13 @@  discard block
 block discarded – undo
378 378
             exit(1);
379 379
         }
380 380
 
381
-        if (! extension_loaded('swoole')) {
381
+        if (!extension_loaded('swoole')) {
382 382
             $this->error("Can't detect Swoole extension installed.");
383 383
 
384 384
             exit(1);
385 385
         }
386 386
 
387
-        if (! version_compare(swoole_version(), '4.0.0', 'ge')) {
387
+        if (!version_compare(swoole_version(), '4.0.0', 'ge')) {
388 388
             $this->error("Your Swoole version must be higher than 4.0 to use coroutine.");
389 389
 
390 390
             exit(1);
@@ -396,15 +396,15 @@  discard block
 block discarded – undo
396 396
      */
397 397
     protected function registerAccessLog()
398 398
     {
399
-        $this->laravel->singleton(OutputStyle::class, function () {
399
+        $this->laravel->singleton(OutputStyle::class, function() {
400 400
             return new OutputStyle($this->input, $this->output);
401 401
         });
402 402
 
403
-        $this->laravel->singleton(AccessOutput::class, function () {
403
+        $this->laravel->singleton(AccessOutput::class, function() {
404 404
             return new AccessOutput(new ConsoleOutput);
405 405
         });
406 406
 
407
-        $this->laravel->singleton(AccessLog::class, function (Container $container) {
407
+        $this->laravel->singleton(AccessLog::class, function(Container $container) {
408 408
             return new AccessLog($container->make(AccessOutput::class));
409 409
         });
410 410
     }
Please login to merge, or discard this patch.
src/Coroutine/Connectors/ConnectorFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     public static function make(string $version): MySqlConnector
40 40
     {
41 41
         $isMatch = static::isFileVersionMatch($version);
42
-        $class = static::copy(static::stub($version), ! $isMatch);
42
+        $class = static::copy(static::stub($version), !$isMatch);
43 43
 
44 44
         return new $class;
45 45
     }
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
      */
65 65
     public static function copy(string $stub, bool $rewrite = false): string
66 66
     {
67
-        if (! file_exists(static::CONNECTOR_CLASS_PATH) || $rewrite) {
67
+        if (!file_exists(static::CONNECTOR_CLASS_PATH) || $rewrite) {
68 68
             copy($stub, static::CONNECTOR_CLASS_PATH);
69 69
         }
70 70
 
Please login to merge, or discard this patch.
src/Coroutine/PDOStatement.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
     public function bindParam($parameter, &$variable, $type = null, $maxlen = null, $driverdata = null)
56 56
     {
57
-        if (! is_string($parameter) && ! is_int($parameter)) {
57
+        if (!is_string($parameter) && !is_int($parameter)) {
58 58
             return false;
59 59
         }
60 60
 
@@ -66,12 +66,12 @@  discard block
 block discarded – undo
66 66
 
67 67
     public function bindValue($parameter, $variable, $type = null)
68 68
     {
69
-        if (! is_string($parameter) && ! is_int($parameter)) {
69
+        if (!is_string($parameter) && !is_int($parameter)) {
70 70
             return false;
71 71
         }
72 72
 
73 73
         if (is_object($variable)) {
74
-            if (! method_exists($variable, '__toString')) {
74
+            if (!method_exists($variable, '__toString')) {
75 75
                 return false;
76 76
             } else {
77 77
                 $variable = (string) $variable;
@@ -92,14 +92,14 @@  discard block
 block discarded – undo
92 92
 
93 93
     public function execute($inputParameters = null)
94 94
     {
95
-        if (! empty($inputParameters)) {
95
+        if (!empty($inputParameters)) {
96 96
             foreach ($inputParameters as $key => $value) {
97 97
                 $this->bindParam($key, $value);
98 98
             }
99 99
         }
100 100
 
101 101
         $inputParameters = [];
102
-        if (! empty($this->statement->bindKeyMap)) {
102
+        if (!empty($this->statement->bindKeyMap)) {
103 103
             foreach ($this->statement->bindKeyMap as $nameKey => $numKey) {
104 104
                 if (isset($this->bindMap[$nameKey])) {
105 105
                     $inputParameters[$numKey] = $this->bindMap[$nameKey];
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
         $ctorArgs = null
157 157
     )
158 158
     {
159
-        if (! is_array($rawData)) {
159
+        if (!is_array($rawData)) {
160 160
             return false;
161 161
         }
162 162
         if (empty($rawData)) {
Please login to merge, or discard this patch.
src/Coroutine/PDO.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
     {
75 75
         $this->client->connect($options);
76 76
 
77
-        if (! $this->client->connected) {
77
+        if (!$this->client->connected) {
78 78
             $message = $this->client->connect_error ?: $this->client->error;
79 79
             $errorCode = $this->client->connect_errno ?: $this->client->errno;
80 80
 
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
      */
131 131
     public static function checkDriver(string $driver)
132 132
     {
133
-        if (! in_array($driver, static::getAvailableDrivers())) {
133
+        if (!in_array($driver, static::getAvailableDrivers())) {
134 134
             throw new \InvalidArgumentException("{$driver} driver is not supported yet.");
135 135
         }
136 136
     }
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
         if (strpos($statement, ':') !== false) {
253 253
             $i = 0;
254 254
             $bindKeyMap = [];
255
-            $statement = preg_replace_callback('/:([a-zA-Z_]\w*?)\b/', function ($matches) use (&$i, &$bindKeyMap) {
255
+            $statement = preg_replace_callback('/:([a-zA-Z_]\w*?)\b/', function($matches) use (&$i, &$bindKeyMap) {
256 256
                 $bindKeyMap[$matches[1]] = $i++;
257 257
 
258 258
                 return '?';
Please login to merge, or discard this patch.
src/LaravelServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 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, 'laravel');
21 21
         });
22 22
 
Please login to merge, or discard this patch.
src/Server/helpers.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 /**
4 4
  * This is only for `function not exists` in config/swoole_http.php.
5 5
  */
6
-if (! function_exists('swoole_cpu_num')) {
6
+if (!function_exists('swoole_cpu_num')) {
7 7
     function swoole_cpu_num(): int
8 8
     {
9 9
         return 1;
@@ -13,10 +13,10 @@  discard block
 block discarded – undo
13 13
 /**
14 14
  * This is only for `function not exists` in config/swoole_http.php.
15 15
  */
16
-if (! defined('SWOOLE_SOCK_TCP')) {
16
+if (!defined('SWOOLE_SOCK_TCP')) {
17 17
     define('SWOOLE_SOCK_TCP', 1);
18 18
 }
19 19
 
20
-if (! defined('SWOOLE_PROCESS')) {
20
+if (!defined('SWOOLE_PROCESS')) {
21 21
     define('SWOOLE_PROCESS', 3);
22 22
 }
Please login to merge, or discard this patch.
src/HotReload/FSProcess.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -62,8 +62,8 @@  discard block
 block discarded – undo
62 62
      */
63 63
     public function make(?callable $callback = null)
64 64
     {
65
-        $mcb = function ($type, $buffer) use ($callback) {
66
-            if (! $this->locked && AppProcess::OUT === $type && $event = FSEventParser::toEvent($buffer)) {
65
+        $mcb = function($type, $buffer) use ($callback) {
66
+            if (!$this->locked && AppProcess::OUT === $type && $event = FSEventParser::toEvent($buffer)) {
67 67
                 $this->locked = true;
68 68
                 ($callback) ? $callback($event) : null;
69 69
                 $this->locked = false;
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
             }
72 72
         };
73 73
 
74
-        return new SwooleProcess(function () use ($mcb) {
74
+        return new SwooleProcess(function() use ($mcb) {
75 75
             (new AppProcess($this->configure()))->setTimeout(0)->run($mcb);
76 76
         }, false, false);
77 77
     }
Please login to merge, or discard this patch.
src/Concerns/InteractsWithSwooleQueue.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
      */
15 15
     protected function isSwooleQueuePacket($packet)
16 16
     {
17
-        if (! is_string($packet)) {
17
+        if (!is_string($packet)) {
18 18
             return false;
19 19
         }
20 20
 
Please login to merge, or discard this patch.