@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | */ |
143 | 143 | protected function stop() |
144 | 144 | { |
145 | - if (! $this->isRunning()) { |
|
145 | + if (!$this->isRunning()) { |
|
146 | 146 | $this->error("Failed! There is no swoole_http_server process running."); |
147 | 147 | |
148 | 148 | return; |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | */ |
183 | 183 | protected function reload() |
184 | 184 | { |
185 | - if (! $this->isRunning()) { |
|
185 | + if (!$this->isRunning()) { |
|
186 | 186 | $this->error("Failed! There is no swoole_http_server process running."); |
187 | 187 | |
188 | 188 | return; |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | |
191 | 191 | $this->info('Reloading swoole_http_server...'); |
192 | 192 | |
193 | - if (! $this->killProcess(SIGUSR1)) { |
|
193 | + if (!$this->killProcess(SIGUSR1)) { |
|
194 | 194 | $this->error('> failure'); |
195 | 195 | |
196 | 196 | return; |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | { |
266 | 266 | $this->action = $this->argument('action'); |
267 | 267 | |
268 | - if (! in_array($this->action, ['start', 'stop', 'restart', 'reload', 'infos'], true)) { |
|
268 | + if (!in_array($this->action, ['start', 'stop', 'restart', 'reload', 'infos'], true)) { |
|
269 | 269 | $this->error( |
270 | 270 | "Invalid argument '{$this->action}'. Expected 'start', 'stop', 'restart', 'reload' or 'infos'." |
271 | 271 | ); |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | $filter = Arr::get($this->config, 'hot_reload.filter'); |
287 | 287 | $log = Arr::get($this->config, 'hot_reload.log'); |
288 | 288 | |
289 | - $cb = function (FSEvent $event) use ($server, $log) { |
|
289 | + $cb = function(FSEvent $event) use ($server, $log) { |
|
290 | 290 | $log ? $this->info(FSOutput::format($event)) : null; |
291 | 291 | $server->reload(); |
292 | 292 | }; |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | { |
306 | 306 | $pids = $this->laravel->make(PidManager::class)->read(); |
307 | 307 | |
308 | - if (! count($pids)) { |
|
308 | + if (!count($pids)) { |
|
309 | 309 | return false; |
310 | 310 | } |
311 | 311 | |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | $start = time(); |
341 | 341 | |
342 | 342 | do { |
343 | - if (! $this->isRunning()) { |
|
343 | + if (!$this->isRunning()) { |
|
344 | 344 | break; |
345 | 345 | } |
346 | 346 | |
@@ -370,13 +370,13 @@ discard block |
||
370 | 370 | exit(1); |
371 | 371 | } |
372 | 372 | |
373 | - if (! extension_loaded('swoole') && ! extension_loaded('openswoole')) { |
|
373 | + if (!extension_loaded('swoole') && !extension_loaded('openswoole')) { |
|
374 | 374 | $this->error('Can\'t detect Swoole extension installed.'); |
375 | 375 | |
376 | 376 | exit(1); |
377 | 377 | } |
378 | 378 | |
379 | - if (! version_compare(swoole_version(), '4.3.1', 'ge')) { |
|
379 | + if (!version_compare(swoole_version(), '4.3.1', 'ge')) { |
|
380 | 380 | $this->error('Your Swoole version must be higher than `4.3.1`.'); |
381 | 381 | |
382 | 382 | exit(1); |
@@ -388,15 +388,15 @@ discard block |
||
388 | 388 | */ |
389 | 389 | protected function registerAccessLog() |
390 | 390 | { |
391 | - $this->laravel->singleton(OutputStyle::class, function () { |
|
391 | + $this->laravel->singleton(OutputStyle::class, function() { |
|
392 | 392 | return new OutputStyle($this->input, $this->output); |
393 | 393 | }); |
394 | 394 | |
395 | - $this->laravel->singleton(AccessOutput::class, function () { |
|
395 | + $this->laravel->singleton(AccessOutput::class, function() { |
|
396 | 396 | return new AccessOutput(new ConsoleOutput); |
397 | 397 | }); |
398 | 398 | |
399 | - $this->laravel->singleton(AccessLog::class, function (Container $container) { |
|
399 | + $this->laravel->singleton(AccessLog::class, function(Container $container) { |
|
400 | 400 | return new AccessLog($container->make(AccessOutput::class)); |
401 | 401 | }); |
402 | 402 | } |