@@ -2,11 +2,11 @@ |
||
| 2 | 2 | |
| 3 | 3 | require __DIR__ . '/../vendor/autoload.php'; |
| 4 | 4 | |
| 5 | -Amp\Loop::run(function () { |
|
| 5 | +Amp\Loop::run(function() { |
|
| 6 | 6 | $signals = \pcntl_signal_list(['SIGINT']); |
| 7 | 7 | |
| 8 | 8 | foreach ($signals as $signal) { |
| 9 | - \ensign_signal($signal, function ($sigNo) { |
|
| 9 | + \ensign_signal($signal, function($sigNo) { |
|
| 10 | 10 | echo \sprintf('System signal "%d" received.' . \PHP_EOL, $sigNo); |
| 11 | 11 | }); |
| 12 | 12 | } |
@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | * file that was distributed with this source code. |
| 9 | 9 | */ |
| 10 | 10 | |
| 11 | -declare(strict_types = 1); |
|
| 11 | +declare(strict_types=1); |
|
| 12 | 12 | |
| 13 | 13 | namespace PHPinnacle\Ensign; |
| 14 | 14 | |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | { |
| 45 | 45 | $token = new Token(); |
| 46 | 46 | |
| 47 | - return new Task(++$this->tasks, new LazyPromise(function () use ($callable, $arguments, $token) { |
|
| 47 | + return new Task(++$this->tasks, new LazyPromise(function() use ($callable, $arguments, $token) { |
|
| 48 | 48 | return $this->adapt($callable(...$arguments), $token); |
| 49 | 49 | }), $token); |
| 50 | 50 | } |
@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | * file that was distributed with this source code. |
| 9 | 9 | */ |
| 10 | 10 | |
| 11 | -declare(strict_types = 1); |
|
| 11 | +declare(strict_types=1); |
|
| 12 | 12 | |
| 13 | 13 | use PHPinnacle\Ensign\Dispatcher; |
| 14 | 14 | use PHPinnacle\Ensign\Task; |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | continue; |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | - $handler = function (string $watcherId, int $sigNo, $sigInfo = null) use ($dispatcher, $signal) { |
|
| 59 | + $handler = function(string $watcherId, int $sigNo, $sigInfo = null) use ($dispatcher, $signal) { |
|
| 60 | 60 | yield $dispatcher->dispatch($signal, $sigNo, $sigInfo, $watcherId); |
| 61 | 61 | }; |
| 62 | 62 | |
@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | * file that was distributed with this source code. |
| 9 | 9 | */ |
| 10 | 10 | |
| 11 | -declare(strict_types = 1); |
|
| 11 | +declare(strict_types=1); |
|
| 12 | 12 | |
| 13 | 13 | namespace PHPinnacle\Ensign; |
| 14 | 14 | |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | { |
| 60 | 60 | $this->handlers[$signal] = $handler; |
| 61 | 61 | |
| 62 | - $this->processor->interrupt($signal, function (...$arguments) use ($signal) { |
|
| 62 | + $this->processor->interrupt($signal, function(...$arguments) use ($signal) { |
|
| 63 | 63 | return $this->dispatch($signal, ...$arguments); |
| 64 | 64 | }); |
| 65 | 65 | |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | */ |
| 108 | 108 | private function error(\Exception $exception): callable |
| 109 | 109 | { |
| 110 | - return function () use ($exception) { |
|
| 110 | + return function() use ($exception) { |
|
| 111 | 111 | throw $exception; |
| 112 | 112 | }; |
| 113 | 113 | } |
@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | * file that was distributed with this source code. |
| 9 | 9 | */ |
| 10 | 10 | |
| 11 | -declare(strict_types = 1); |
|
| 11 | +declare(strict_types=1); |
|
| 12 | 12 | |
| 13 | 13 | namespace PHPinnacle\Ensign; |
| 14 | 14 | |
@@ -74,13 +74,13 @@ discard block |
||
| 74 | 74 | { |
| 75 | 75 | $deferred = new Deferred; |
| 76 | 76 | |
| 77 | - $watcher = Loop::delay($timeout, function () use ($deferred) { |
|
| 77 | + $watcher = Loop::delay($timeout, function() use ($deferred) { |
|
| 78 | 78 | $deferred->fail(new Exception\TaskTimeout($this->id)); |
| 79 | 79 | }); |
| 80 | 80 | Loop::unreference($watcher); |
| 81 | 81 | |
| 82 | 82 | $promise = $this->promise; |
| 83 | - $promise->onResolve(function () use ($deferred, $watcher) { |
|
| 83 | + $promise->onResolve(function() use ($deferred, $watcher) { |
|
| 84 | 84 | Loop::cancel($watcher); |
| 85 | 85 | |
| 86 | 86 | $deferred->resolve($this->promise); |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | * file that was distributed with this source code. |
| 9 | 9 | */ |
| 10 | 10 | |
| 11 | -declare(strict_types = 1); |
|
| 11 | +declare(strict_types=1); |
|
| 12 | 12 | |
| 13 | 13 | namespace PHPinnacle\Ensign\Resolver; |
| 14 | 14 | |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | * file that was distributed with this source code. |
| 9 | 9 | */ |
| 10 | 10 | |
| 11 | -declare(strict_types = 1); |
|
| 11 | +declare(strict_types=1); |
|
| 12 | 12 | |
| 13 | 13 | namespace PHPinnacle\Ensign\Resolver; |
| 14 | 14 | |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | * file that was distributed with this source code. |
| 9 | 9 | */ |
| 10 | 10 | |
| 11 | -declare(strict_types = 1); |
|
| 11 | +declare(strict_types=1); |
|
| 12 | 12 | |
| 13 | 13 | namespace PHPinnacle\Ensign\Resolver; |
| 14 | 14 | |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | * file that was distributed with this source code. |
| 9 | 9 | */ |
| 10 | 10 | |
| 11 | -declare(strict_types = 1); |
|
| 11 | +declare(strict_types=1); |
|
| 12 | 12 | |
| 13 | 13 | namespace PHPinnacle\Ensign\Resolver; |
| 14 | 14 | |