@@ -71,7 +71,7 @@ |
||
| 71 | 71 | return $this; |
| 72 | 72 | } |
| 73 | 73 | |
| 74 | - public function catch(callable $callback): self |
|
| 74 | + public function catch (callable $callback): self |
|
| 75 | 75 | { |
| 76 | 76 | $this->error[] = $callback; |
| 77 | 77 | |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | ) |
| 51 | 51 | { |
| 52 | 52 | $this->taskFactory = $taskFactory ?? new TaskFactory(); |
| 53 | - $this->encoder = $encoder?? new Encoder(); |
|
| 53 | + $this->encoder = $encoder ?? new Encoder(); |
|
| 54 | 54 | $this->sleep = $sleep; |
| 55 | 55 | |
| 56 | 56 | $this->listener(); |
@@ -60,9 +60,9 @@ discard block |
||
| 60 | 60 | { |
| 61 | 61 | pcntl_async_signals(true); |
| 62 | 62 | |
| 63 | - pcntl_signal(SIGCHLD, function ($signo, $status) { |
|
| 63 | + pcntl_signal(SIGCHLD, function($signo, $status) { |
|
| 64 | 64 | while (true) { |
| 65 | - $pid = pcntl_waitpid(-1, $processState, WNOHANG | WUNTRACED); |
|
| 65 | + $pid = pcntl_waitpid(-1, $processState, WNOHANG|WUNTRACED); |
|
| 66 | 66 | if ($pid <= 0) { |
| 67 | 67 | break; |
| 68 | 68 | } |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | __DIR__ . '/../../../vendor/autoload.php', |
| 46 | 46 | __DIR__ . '/../../vendor/autoload.php', |
| 47 | 47 | __DIR__ . '/../vendor/autoload.php', |
| 48 | - ], static function (string $path) { |
|
| 48 | + ], static function(string $path) { |
|
| 49 | 49 | return file_exists($path); |
| 50 | 50 | }); |
| 51 | 51 | $this->autoloader = reset($paths); |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | __DIR__ . '/../bin/child', |
| 68 | 68 | __DIR__ . '/bin/child', |
| 69 | 69 | |
| 70 | - ], static function (string $path) { |
|
| 70 | + ], static function(string $path) { |
|
| 71 | 71 | return file_exists($path); |
| 72 | 72 | }); |
| 73 | 73 | $this->script = reset($paths); |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | * @param callable $callback |
| 42 | 42 | * @return mixed |
| 43 | 43 | */ |
| 44 | - public function catch(callable $callback): self; |
|
| 44 | + public function catch (callable $callback): self; |
|
| 45 | 45 | |
| 46 | 46 | /** |
| 47 | 47 | * @return $this |