@@ -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\Contract; |
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\Contract; |
14 | 14 |
@@ -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 | |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | { |
40 | 40 | $this->handlers[$signal] = $handler; |
41 | 41 | |
42 | - $this->processor->interrupt($signal, function (...$arguments) use ($signal) { |
|
42 | + $this->processor->interrupt($signal, function(...$arguments) use ($signal) { |
|
43 | 43 | return $this->dispatch($signal, ...$arguments); |
44 | 44 | }); |
45 | 45 | |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | $signal = \get_class($signal); |
58 | 58 | } |
59 | 59 | |
60 | - $handler = $this->handlers[$signal] ?? static function () use ($signal) { |
|
60 | + $handler = $this->handlers[$signal] ?? static function() use ($signal) { |
|
61 | 61 | throw new Exception\UnknownSignal($signal); |
62 | 62 | }; |
63 | 63 |
@@ -39,32 +39,32 @@ |
||
39 | 39 | { |
40 | 40 | $listeners = $this->listeners[$message->signal] ?? []; |
41 | 41 | |
42 | - yield \array_map(function ($listener) use ($message) { |
|
42 | + yield \array_map(function($listener) use ($message) { |
|
43 | 43 | return $this->processor->execute($listener, $message->arguments); |
44 | 44 | }, $listeners); |
45 | 45 | } |
46 | 46 | } |
47 | 47 | |
48 | -Amp\Loop::run(function () { |
|
48 | +Amp\Loop::run(function() { |
|
49 | 49 | $processor = new Processor\SimpleProcessor(); |
50 | 50 | |
51 | 51 | $publisher = new Publisher($processor); |
52 | 52 | $publisher |
53 | - ->listen('print', function ($num) { |
|
53 | + ->listen('print', function($num) { |
|
54 | 54 | for ($i = 0; $i < $num; $i++) { |
55 | 55 | echo '-'; |
56 | 56 | |
57 | 57 | yield new Delayed(100); |
58 | 58 | } |
59 | 59 | }) |
60 | - ->listen('print', function ($num) { |
|
60 | + ->listen('print', function($num) { |
|
61 | 61 | for ($i = 0; $i < $num; $i++) { |
62 | 62 | echo '+'; |
63 | 63 | |
64 | 64 | yield new Delayed(100); |
65 | 65 | } |
66 | 66 | }) |
67 | - ->listen('print', function ($num) { |
|
67 | + ->listen('print', function($num) { |
|
68 | 68 | for ($i = 0; $i < $num; $i++) { |
69 | 69 | echo '*'; |
70 | 70 |
@@ -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 | $processor = new Processor\ParallelProcessor(); |
10 | 10 | $dispatcher = new Dispatcher($processor); |
11 | - $dispatcher->register('load', function ($url) { |
|
11 | + $dispatcher->register('load', function($url) { |
|
12 | 12 | echo "Start getting: {$url}" . \PHP_EOL; |
13 | 13 | |
14 | 14 | file_get_contents($url); |
@@ -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\Action; |
@@ -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 |
@@ -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 @@ |
||
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 |