@@ -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\Exception; |
| 14 | 14 | |
@@ -2,15 +2,15 @@ |
||
| 2 | 2 | |
| 3 | 3 | require __DIR__ . '/../vendor/autoload.php'; |
| 4 | 4 | |
| 5 | -Amp\Loop::run(function () { |
|
| 6 | - \ensign_signal('wow', function ($sigNo) { |
|
| 5 | +Amp\Loop::run(function() { |
|
| 6 | + \ensign_signal('wow', function($sigNo) { |
|
| 7 | 7 | echo \sprintf('System signal "%d" received.' . \PHP_EOL, $sigNo); |
| 8 | 8 | }); |
| 9 | 9 | |
| 10 | 10 | $signals = \pcntl_signal_list(['SIGINT']); |
| 11 | 11 | |
| 12 | 12 | foreach ($signals as $signal) { |
| 13 | - \ensign_signal($signal, function ($sigNo) { |
|
| 13 | + \ensign_signal($signal, function($sigNo) { |
|
| 14 | 14 | yield 'wow' => $sigNo; |
| 15 | 15 | }); |
| 16 | 16 | } |
@@ -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\Exception; |
| 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\Exception; |
| 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\Exception; |
| 14 | 14 | |
@@ -7,7 +7,7 @@ |
||
| 7 | 7 | * file that was distributed with this source code. |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | -declare(strict_types = 1); |
|
| 10 | +declare(strict_types=1); |
|
| 11 | 11 | |
| 12 | 12 | namespace PHPinnacle\Ensign; |
| 13 | 13 | |
@@ -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 = static function (string $watcherId, int $sigNo, $sigInfo = null) use ($dispatcher, $signal) { |
|
| 59 | + $handler = static 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 | |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | $deferred = new Deferred; |
| 76 | 76 | $resolved = false; |
| 77 | 77 | |
| 78 | - $watcher = Loop::delay($timeout, function () use ($deferred, &$resolved) { |
|
| 78 | + $watcher = Loop::delay($timeout, function() use ($deferred, &$resolved) { |
|
| 79 | 79 | if ($resolved) { |
| 80 | 80 | return; |
| 81 | 81 | } |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | }); |
| 87 | 87 | |
| 88 | 88 | $promise = $this->promise; |
| 89 | - $promise->onResolve(function () use ($deferred, $watcher, &$resolved) { |
|
| 89 | + $promise->onResolve(function() use ($deferred, $watcher, &$resolved) { |
|
| 90 | 90 | if ($resolved) { |
| 91 | 91 | return; |
| 92 | 92 | } |
@@ -5,10 +5,10 @@ |
||
| 5 | 5 | |
| 6 | 6 | require __DIR__ . '/../vendor/autoload.php'; |
| 7 | 7 | |
| 8 | -Amp\Loop::run(function () { |
|
| 8 | +Amp\Loop::run(function() { |
|
| 9 | 9 | $dispatcher = new Dispatcher(); |
| 10 | 10 | $dispatcher |
| 11 | - ->register('emit', function (string $string, int $num, int $delay = 100) { |
|
| 11 | + ->register('emit', function(string $string, int $num, int $delay = 100) { |
|
| 12 | 12 | for ($i = 0; $i < $num; $i++) { |
| 13 | 13 | echo $string; |
| 14 | 14 | |