@@ -411,21 +411,21 @@ |
||
| 411 | 411 | protected function normalizeException(Throwable $e) |
| 412 | 412 | { |
| 413 | 413 | if (! $e instanceof Exception) { |
| 414 | - if ($e instanceof \ParseError) { |
|
| 415 | - $severity = E_PARSE; |
|
| 416 | - } elseif ($e instanceof \TypeError) { |
|
| 417 | - $severity = E_RECOVERABLE_ERROR; |
|
| 418 | - } else { |
|
| 419 | - $severity = E_ERROR; |
|
| 420 | - } |
|
| 414 | + if ($e instanceof \ParseError) { |
|
| 415 | + $severity = E_PARSE; |
|
| 416 | + } elseif ($e instanceof \TypeError) { |
|
| 417 | + $severity = E_RECOVERABLE_ERROR; |
|
| 418 | + } else { |
|
| 419 | + $severity = E_ERROR; |
|
| 420 | + } |
|
| 421 | 421 | |
| 422 | - //error_get_last() syntax |
|
| 423 | - $error = [ |
|
| 424 | - 'type' => $severity, |
|
| 425 | - 'message' => $e->getMessage(), |
|
| 426 | - 'file' => $e->getFile(), |
|
| 427 | - 'line' => $e->getLine(), |
|
| 428 | - ]; |
|
| 422 | + //error_get_last() syntax |
|
| 423 | + $error = [ |
|
| 424 | + 'type' => $severity, |
|
| 425 | + 'message' => $e->getMessage(), |
|
| 426 | + 'file' => $e->getFile(), |
|
| 427 | + 'line' => $e->getLine(), |
|
| 428 | + ]; |
|
| 429 | 429 | |
| 430 | 430 | $e = new FatalError($e->getMessage(), $e->getCode(), $error, null, true, $e->getTrace()); |
| 431 | 431 | } |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | $this->createTables(); |
| 116 | 116 | $this->prepareWebsocket(); |
| 117 | 117 | |
| 118 | - if (! $this->container->make(Server::class)->taskworker) { |
|
| 118 | + if (!$this->container->make(Server::class)->taskworker) { |
|
| 119 | 119 | $this->setSwooleServerListeners(); |
| 120 | 120 | } |
| 121 | 121 | } |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | $server = $this->container->make(Server::class); |
| 129 | 129 | foreach ($this->events as $event) { |
| 130 | 130 | $listener = Str::camel("on_$event"); |
| 131 | - $callback = method_exists($this, $listener) ? [$this, $listener] : function () use ($event) { |
|
| 131 | + $callback = method_exists($this, $listener) ? [$this, $listener] : function() use ($event) { |
|
| 132 | 132 | $this->container->make('events')->dispatch("swoole.$event", func_get_args()); |
| 133 | 133 | }; |
| 134 | 134 | |
@@ -322,7 +322,7 @@ discard block |
||
| 322 | 322 | */ |
| 323 | 323 | protected function bindSandbox() |
| 324 | 324 | { |
| 325 | - $this->app->singleton(Sandbox::class, function ($app) { |
|
| 325 | + $this->app->singleton(Sandbox::class, function($app) { |
|
| 326 | 326 | return new Sandbox($app, $this->framework); |
| 327 | 327 | }); |
| 328 | 328 | |
@@ -410,7 +410,7 @@ discard block |
||
| 410 | 410 | */ |
| 411 | 411 | protected function normalizeException(Throwable $e) |
| 412 | 412 | { |
| 413 | - if (! $e instanceof Exception) { |
|
| 413 | + if (!$e instanceof Exception) { |
|
| 414 | 414 | if ($e instanceof \ParseError) { |
| 415 | 415 | $severity = E_PARSE; |
| 416 | 416 | } elseif ($e instanceof \TypeError) { |