@@ -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 |
@@ -56,9 +56,9 @@ |
||
| 56 | 56 | protected function listener(): void |
| 57 | 57 | { |
| 58 | 58 | pcntl_async_signals(true); |
| 59 | - pcntl_signal(SIGCHLD, function ($signo, $status) { |
|
| 59 | + pcntl_signal(SIGCHLD, function($signo, $status) { |
|
| 60 | 60 | while (true) { |
| 61 | - $pid = pcntl_waitpid(-1, $processState, WNOHANG | WUNTRACED); |
|
| 61 | + $pid = pcntl_waitpid(-1, $processState, WNOHANG|WUNTRACED); |
|
| 62 | 62 | if ($pid <= 0) { |
| 63 | 63 | break; |
| 64 | 64 | } |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | __DIR__ . '/../../../' . $file, |
| 46 | 46 | __DIR__ . '/../../' . $file, |
| 47 | 47 | __DIR__ . '/../' . $file, |
| 48 | - ], static function (string $path) { |
|
| 48 | + ], static function(string $path) { |
|
| 49 | 49 | return file_exists($path); |
| 50 | 50 | }); |
| 51 | 51 | |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | */ |
| 35 | 35 | public function handle(): void |
| 36 | 36 | { |
| 37 | - $closure = function () { |
|
| 37 | + $closure = function() { |
|
| 38 | 38 | return 33; |
| 39 | 39 | }; |
| 40 | 40 | |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | */ |
| 55 | 55 | public function handleException(): void |
| 56 | 56 | { |
| 57 | - $closure = function () { |
|
| 57 | + $closure = function() { |
|
| 58 | 58 | throw new \Exception('Test message'); |
| 59 | 59 | }; |
| 60 | 60 | |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | */ |
| 75 | 75 | public function write(): void |
| 76 | 76 | { |
| 77 | - $closure = function () { |
|
| 77 | + $closure = function() { |
|
| 78 | 78 | return 'Same return value'; |
| 79 | 79 | }; |
| 80 | 80 | |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | * @param callable $callback |
| 64 | 64 | * @return $this |
| 65 | 65 | */ |
| 66 | - public function catch(callable $callback): self |
|
| 66 | + public function catch (callable $callback): self |
|
| 67 | 67 | { |
| 68 | 68 | $this->error[] = $callback; |
| 69 | 69 | |
@@ -27,12 +27,12 @@ discard block |
||
| 27 | 27 | */ |
| 28 | 28 | public function add(): void |
| 29 | 29 | { |
| 30 | - $this->async->add(static function () { |
|
| 30 | + $this->async->add(static function() { |
|
| 31 | 31 | usleep(8000); |
| 32 | 32 | |
| 33 | 33 | return 555; |
| 34 | 34 | }); |
| 35 | - $this->async->add(static function () { |
|
| 35 | + $this->async->add(static function() { |
|
| 36 | 36 | return 2; |
| 37 | 37 | }); |
| 38 | 38 | |
@@ -46,9 +46,9 @@ discard block |
||
| 46 | 46 | */ |
| 47 | 47 | public function then(): void |
| 48 | 48 | { |
| 49 | - $this->async->add(static function () { |
|
| 49 | + $this->async->add(static function() { |
|
| 50 | 50 | return 555; |
| 51 | - })->then(static function (int $value) { |
|
| 51 | + })->then(static function(int $value) { |
|
| 52 | 52 | static::assertEquals(555, $value); |
| 53 | 53 | }); |
| 54 | 54 | |