@@ -74,7 +74,7 @@ discard block |
||
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 |
||
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 |
||
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 '?'; |
@@ -16,7 +16,7 @@ |
||
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 |
@@ -3,7 +3,7 @@ discard block |
||
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 |
||
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 | } |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | { |
120 | 120 | foreach ($this->events as $event) { |
121 | 121 | $listener = Str::camel("on_$event"); |
122 | - $callback = method_exists($this, $listener) ? [$this, $listener] : function () use ($event) { |
|
122 | + $callback = method_exists($this, $listener) ? [$this, $listener] : function() use ($event) { |
|
123 | 123 | $this->container->make('events')->fire("swoole.$event", func_get_args()); |
124 | 124 | }; |
125 | 125 | |
@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | */ |
317 | 317 | protected function bindSandbox() |
318 | 318 | { |
319 | - $this->app->singleton(Sandbox::class, function ($app) { |
|
319 | + $this->app->singleton(Sandbox::class, function($app) { |
|
320 | 320 | return new Sandbox($app, $this->framework); |
321 | 321 | }); |
322 | 322 | |
@@ -432,7 +432,7 @@ discard block |
||
432 | 432 | */ |
433 | 433 | protected function normalizeException(Throwable $e) |
434 | 434 | { |
435 | - if (! $e instanceof Exception) { |
|
435 | + if (!$e instanceof Exception) { |
|
436 | 436 | $e = new FatalThrowableError($e); |
437 | 437 | } |
438 | 438 |
@@ -62,8 +62,8 @@ discard block |
||
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 |
||
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 | } |