Passed
Pull Request — master (#457)
by
unknown
03:42
created
src/Commands/HttpServerCommand.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
      */
138 138
     public function registerProcess($server)
139 139
     {
140
-        $this->laravel->singleton(CustomProcess::class, function () {
140
+        $this->laravel->singleton(CustomProcess::class, function() {
141 141
             return new CustomProcess();
142 142
         });
143 143
         $customProcess = $this->laravel->make(CustomProcess::class);
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
      */
153 153
     protected function stop()
154 154
     {
155
-        if (! $this->isRunning()) {
155
+        if (!$this->isRunning()) {
156 156
             $this->error("Failed! There is no swoole_http_server process running.");
157 157
 
158 158
             return;
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
      */
193 193
     protected function reload()
194 194
     {
195
-        if (! $this->isRunning()) {
195
+        if (!$this->isRunning()) {
196 196
             $this->error("Failed! There is no swoole_http_server process running.");
197 197
 
198 198
             return;
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 
201 201
         $this->info('Reloading swoole_http_server...');
202 202
 
203
-        if (! $this->killProcess(SIGUSR1)) {
203
+        if (!$this->killProcess(SIGUSR1)) {
204 204
             $this->error('> failure');
205 205
 
206 206
             return;
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
         $filter = Arr::get($this->config, 'hot_reload.filter');
283 283
         $log = Arr::get($this->config, 'hot_reload.log');
284 284
 
285
-        $cb = function (FSEvent $event) use ($server, $log) {
285
+        $cb = function(FSEvent $event) use ($server, $log) {
286 286
             $log ? $this->info(FSOutput::format($event)) : null;
287 287
             $server->reload();
288 288
         };
@@ -310,11 +310,11 @@  discard block
 block discarded – undo
310 310
 
311 311
         if ($managerPid) {
312 312
             // Swoole process mode
313
-            return $masterPid && $managerPid && Process::kill((int)$managerPid, 0);
313
+            return $masterPid && $managerPid && Process::kill((int) $managerPid, 0);
314 314
         }
315 315
 
316 316
         // Swoole base mode, no manager process
317
-        return $masterPid && Process::kill((int)$masterPid, 0);
317
+        return $masterPid && Process::kill((int) $masterPid, 0);
318 318
     }
319 319
 
320 320
     /**
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
             $start = time();
337 337
 
338 338
             do {
339
-                if (! $this->isRunning()) {
339
+                if (!$this->isRunning()) {
340 340
                     break;
341 341
                 }
342 342
 
@@ -384,15 +384,15 @@  discard block
 block discarded – undo
384 384
      */
385 385
     protected function registerAccessLog()
386 386
     {
387
-        $this->laravel->singleton(OutputStyle::class, function () {
387
+        $this->laravel->singleton(OutputStyle::class, function() {
388 388
             return new OutputStyle($this->input, $this->output);
389 389
         });
390 390
 
391
-        $this->laravel->singleton(AccessOutput::class, function () {
391
+        $this->laravel->singleton(AccessOutput::class, function() {
392 392
             return new AccessOutput(new ConsoleOutput);
393 393
         });
394 394
 
395
-        $this->laravel->singleton(AccessLog::class, function (Container $container) {
395
+        $this->laravel->singleton(AccessLog::class, function(Container $container) {
396 396
             return new AccessLog($container->make(AccessOutput::class));
397 397
         });
398 398
     }
Please login to merge, or discard this patch.
src/Process/CustomProcess.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
             );
19 19
         }
20 20
 
21
-        return new SwooleProcess(function ($process) use ($server, $process_class) {
21
+        return new SwooleProcess(function($process) use ($server, $process_class) {
22 22
             $p = new $process_class();
23 23
             $p->handle($server, $process);
24 24
         }, false, false);
Please login to merge, or discard this patch.