@@ -41,7 +41,7 @@ |
||
| 41 | 41 | */ |
| 42 | 42 | public static function error(\Exception $error): self |
| 43 | 43 | { |
| 44 | - return new self(function () use ($error) { |
|
| 44 | + return new self(function() use ($error) { |
|
| 45 | 45 | throw $error; |
| 46 | 46 | }); |
| 47 | 47 | } |
@@ -23,10 +23,10 @@ discard block |
||
| 23 | 23 | { |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | -Amp\Loop::run(function () { |
|
| 26 | +Amp\Loop::run(function() { |
|
| 27 | 27 | $dispatcher = new SignalDispatcher(); |
| 28 | 28 | $dispatcher |
| 29 | - ->register(Ping::class, function (Ping $cmd) { |
|
| 29 | + ->register(Ping::class, function(Ping $cmd) { |
|
| 30 | 30 | if ($cmd->times > 0) { |
| 31 | 31 | $cmd->times--; |
| 32 | 32 | |
@@ -37,12 +37,12 @@ discard block |
||
| 37 | 37 | yield new Stop(); |
| 38 | 38 | } |
| 39 | 39 | }) |
| 40 | - ->register(Pong::class, function (Pong $cmd) { |
|
| 40 | + ->register(Pong::class, function(Pong $cmd) { |
|
| 41 | 41 | echo 'Pong!' . \PHP_EOL; |
| 42 | 42 | |
| 43 | 43 | yield new Ping($cmd->times); |
| 44 | 44 | }) |
| 45 | - ->register(Stop::class, function () { |
|
| 45 | + ->register(Stop::class, function() { |
|
| 46 | 46 | echo 'Stop!' . \PHP_EOL; |
| 47 | 47 | }) |
| 48 | 48 | ; |