Passed
Pull Request — master (#808)
by Maxim
05:55
created
src/Queue/src/Interceptor/Consume/Handler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 {
11 11
     public function __construct(
12 12
         private readonly CoreInterface $core
13
-    ) {
13
+    ){
14 14
     }
15 15
 
16 16
     public function handle(
Please login to merge, or discard this patch.
src/Queue/src/Job/CallableJob.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,16 +12,16 @@
 block discarded – undo
12 12
 {
13 13
     public function __construct(
14 14
         private readonly InvokerInterface $invoker
15
-    ) {
15
+    ){
16 16
     }
17 17
 
18 18
     public function handle(string $name, string $id, array $payload, array $context = []): void
19 19
     {
20
-        if (!isset($payload['callback'])) {
20
+        if (!isset($payload['callback'])){
21 21
             throw new InvalidArgumentException('Payload `callback` key is required.');
22 22
         }
23 23
 
24
-        if (!$payload['callback'] instanceof \Closure) {
24
+        if (!$payload['callback'] instanceof \Closure){
25 25
             throw new InvalidArgumentException('Payload `callback` key value type should be a closure.');
26 26
         }
27 27
 
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,11 +17,13 @@
 block discarded – undo
17 17
 
18 18
     public function handle(string $name, string $id, array $payload, array $context = []): void
19 19
     {
20
-        if (!isset($payload['callback'])) {
20
+        if (!isset($payload['callback']))
21
+        {
21 22
             throw new InvalidArgumentException('Payload `callback` key is required.');
22 23
         }
23 24
 
24
-        if (!$payload['callback'] instanceof \Closure) {
25
+        if (!$payload['callback'] instanceof \Closure)
26
+        {
25 27
             throw new InvalidArgumentException('Payload `callback` key value type should be a closure.');
26 28
         }
27 29
 
Please login to merge, or discard this patch.
src/Queue/src/Job/ObjectJob.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,16 +12,16 @@
 block discarded – undo
12 12
 {
13 13
     public function __construct(
14 14
         private readonly InvokerInterface $invoker
15
-    ) {
15
+    ){
16 16
     }
17 17
 
18 18
     public function handle(string $name, string $id, array $payload, array $context = []): void
19 19
     {
20
-        if (!isset($payload['object'])) {
20
+        if (!isset($payload['object'])){
21 21
             throw new InvalidArgumentException('Payload `object` key is required.');
22 22
         }
23 23
 
24
-        if (!\is_object($payload['object'])) {
24
+        if (!\is_object($payload['object'])){
25 25
             throw new InvalidArgumentException('Payload `object` key value type should be an object.');
26 26
         }
27 27
 
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,11 +17,13 @@
 block discarded – undo
17 17
 
18 18
     public function handle(string $name, string $id, array $payload, array $context = []): void
19 19
     {
20
-        if (!isset($payload['object'])) {
20
+        if (!isset($payload['object']))
21
+        {
21 22
             throw new InvalidArgumentException('Payload `object` key is required.');
22 23
         }
23 24
 
24
-        if (!\is_object($payload['object'])) {
25
+        if (!\is_object($payload['object']))
26
+        {
25 27
             throw new InvalidArgumentException('Payload `object` key value type should be an object.');
26 28
         }
27 29
 
Please login to merge, or discard this patch.
src/Queue/src/JobHandler.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,17 +19,17 @@
 block discarded – undo
19 19
 
20 20
     public function __construct(
21 21
         protected InvokerInterface $invoker
22
-    ) {
22
+    ){
23 23
     }
24 24
 
25 25
     public function handle(string $name, string $id, array $payload, array $context = []): void
26 26
     {
27
-        try {
27
+        try{
28 28
             $this->invoker->invoke(
29 29
                 [$this, $this->getHandlerMethod()],
30 30
                 \array_merge(['payload' => $payload, 'id' => $id, 'context' => $context], $payload)
31 31
             );
32
-        } catch (\Throwable $e) {
32
+        }catch (\Throwable $e){
33 33
             $message = \sprintf('[%s] %s', $this::class, $e->getMessage());
34 34
             throw new JobException($message, (int)$e->getCode(), $e);
35 35
         }
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,12 +24,15 @@
 block discarded – undo
24 24
 
25 25
     public function handle(string $name, string $id, array $payload, array $context = []): void
26 26
     {
27
-        try {
27
+        try
28
+        {
28 29
             $this->invoker->invoke(
29 30
                 [$this, $this->getHandlerMethod()],
30 31
                 \array_merge(['payload' => $payload, 'id' => $id, 'context' => $context], $payload)
31 32
             );
32
-        } catch (\Throwable $e) {
33
+        }
34
+        catch (\Throwable $e)
35
+        {
33 36
             $message = \sprintf('[%s] %s', $this::class, $e->getMessage());
34 37
             throw new JobException($message, (int)$e->getCode(), $e);
35 38
         }
Please login to merge, or discard this patch.