@@ -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\Executor; |
14 | 14 |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | public function __invoke(Publish $message) |
39 | 39 | { |
40 | - $actions = \array_map(function ($listener) use ($message) { |
|
40 | + $actions = \array_map(function($listener) use ($message) { |
|
41 | 41 | return $this->processor->execute($listener, $message->arguments); |
42 | 42 | }, $this->listeners[$message->signal] ?? []); |
43 | 43 | |
@@ -45,25 +45,25 @@ discard block |
||
45 | 45 | } |
46 | 46 | } |
47 | 47 | |
48 | -Amp\Loop::run(function () { |
|
48 | +Amp\Loop::run(function() { |
|
49 | 49 | $processor = new Processor(); |
50 | 50 | $publisher = new Publisher($processor); |
51 | 51 | $publisher |
52 | - ->listen('print', function ($num) { |
|
52 | + ->listen('print', function($num) { |
|
53 | 53 | for ($i = 0; $i < $num; $i++) { |
54 | 54 | echo '-'; |
55 | 55 | |
56 | 56 | yield new Delayed(100); |
57 | 57 | } |
58 | 58 | }) |
59 | - ->listen('print', function ($num) { |
|
59 | + ->listen('print', function($num) { |
|
60 | 60 | for ($i = 0; $i < $num; $i++) { |
61 | 61 | echo '+'; |
62 | 62 | |
63 | 63 | yield new Delayed(100); |
64 | 64 | } |
65 | 65 | }) |
66 | - ->listen('print', function ($num) { |
|
66 | + ->listen('print', function($num) { |
|
67 | 67 | for ($i = 0; $i < $num; $i++) { |
68 | 68 | echo '*'; |
69 | 69 |
@@ -11,10 +11,10 @@ |
||
11 | 11 | exit(1); |
12 | 12 | } |
13 | 13 | |
14 | -Amp\Loop::run(function () { |
|
14 | +Amp\Loop::run(function() { |
|
15 | 15 | $executor = new Executor\ParallelExecutor(); |
16 | 16 | $dispatcher = new Dispatcher(new Processor($executor)); |
17 | - $dispatcher->register('load', function ($url) { |
|
17 | + $dispatcher->register('load', function($url) { |
|
18 | 18 | echo "Start getting: {$url}" . \PHP_EOL; |
19 | 19 | |
20 | 20 | file_get_contents($url); |
@@ -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\Executor; |
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 | use Amp\Promise; |
14 | 14 | use PHPinnacle\Ensign\Dispatcher; |
@@ -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 @@ 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 | public function __construct(Executor $executor = null) |
40 | 40 | { |
41 | 41 | $this->executor = $executor ?: new Executor\SimpleExecutor; |
42 | - $this->resolver = function (string $interrupt, array $arguments) { |
|
42 | + $this->resolver = function(string $interrupt, array $arguments) { |
|
43 | 43 | if (!isset($this->interruptions[$interrupt])) { |
44 | 44 | throw new Exception\UnknownInterrupt($interrupt); |
45 | 45 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | { |
70 | 70 | $deferred = new Deferred; |
71 | 71 | |
72 | - Amp\Loop::defer(function () use ($deferred, $handler, $arguments) { |
|
72 | + Amp\Loop::defer(function() use ($deferred, $handler, $arguments) { |
|
73 | 73 | try { |
74 | 74 | $result = $this->executor->execute($handler, $arguments); |
75 | 75 |