Completed
Push — master ( 9bc10a...2a8e08 )
by Eugene
07:24
created
examples/executors.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 
9 9
 $container = require __DIR__.'/container.php';
10 10
 
11
-$callback = function ($payload) use ($container) {
11
+$callback = function($payload) use ($container) {
12 12
     $container['logger']->info(strrev($payload));
13 13
 };
14 14
 
Please login to merge, or discard this patch.
examples/container.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,8 +10,8 @@  discard block
 block discarded – undo
10 10
     'logger.file' => __DIR__.'/worker.log',
11 11
 ]);
12 12
 
13
-$container['job.greet'] = function ($c) {
14
-    return function (string $name, Logger $logger) use ($c) {
13
+$container['job.greet'] = function($c) {
14
+    return function(string $name, Logger $logger) use ($c) {
15 15
         $text = $name ? 'Hello '.$name : 'Hello';
16 16
 
17 17
         if ($c['job.greet.yell']) {
@@ -22,11 +22,11 @@  discard block
 block discarded – undo
22 22
     };
23 23
 };
24 24
 
25
-$container['logger'] = function ($c) {
25
+$container['logger'] = function($c) {
26 26
     return new MonologLogger('worker', [new StreamHandler($c['logger.file'])]);
27 27
 };
28 28
 
29
-$container['autowired_job_args'] = function ($c) {
29
+$container['autowired_job_args'] = function($c) {
30 30
     return [
31 31
         'logger' => $c['logger'],
32 32
     ];
Please login to merge, or discard this patch.
src/Runner/Amp/ParallelRunner.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 
29 29
     public function run(int $idleTimeout = 1): void
30 30
     {
31
-        Loop::setErrorHandler(function (\Throwable $e) {
31
+        Loop::setErrorHandler(function(\Throwable $e) {
32 32
             $this->logger->critical($e->getMessage());
33 33
             throw $e;
34 34
         });
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
         Loop::run(function() use ($idleTimeout) {
37 37
             $pool = new DefaultPool();
38 38
 
39
-            Loop::repeat(100, function () use ($pool, $idleTimeout) {
39
+            Loop::repeat(100, function() use ($pool, $idleTimeout) {
40 40
                 if (!$queueTask = $this->queue->take($idleTimeout)) {
41 41
                     $this->logger->debug('Idling...');
42 42
 
Please login to merge, or discard this patch.