@@ -19,13 +19,13 @@ |
||
19 | 19 | |
20 | 20 | public function __construct( |
21 | 21 | private readonly Handler $coreHandler |
22 | - ) { |
|
22 | + ){ |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | /** @inheritdoc */ |
26 | 26 | public function push(string $name, mixed $payload = [], OptionsInterface $options = null): string |
27 | 27 | { |
28 | - if ($options !== null && $options->getDelay()) { |
|
28 | + if ($options !== null && $options->getDelay()){ |
|
29 | 29 | \sleep($options->getDelay()); |
30 | 30 | } |
31 | 31 |
@@ -25,7 +25,8 @@ |
||
25 | 25 | /** @inheritdoc */ |
26 | 26 | public function push(string $name, mixed $payload = [], OptionsInterface $options = null): string |
27 | 27 | { |
28 | - if ($options !== null && $options->getDelay()) { |
|
28 | + if ($options !== null && $options->getDelay()) |
|
29 | + { |
|
29 | 30 | \sleep($options->getDelay()); |
30 | 31 | } |
31 | 32 |
@@ -10,7 +10,7 @@ |
||
10 | 10 | { |
11 | 11 | public function __construct( |
12 | 12 | private readonly ExceptionReporterInterface $reporter |
13 | - ) { |
|
13 | + ){ |
|
14 | 14 | } |
15 | 15 | |
16 | 16 | public function handle(string $driver, string $queue, string $job, mixed $payload, \Throwable $e): void |
@@ -17,7 +17,7 @@ |
||
17 | 17 | { |
18 | 18 | public function __construct( |
19 | 19 | private readonly CoreInterface $core, |
20 | - ) { |
|
20 | + ){ |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | public function push(string $name, mixed $payload = [], mixed $options = null): string |
@@ -13,6 +13,6 @@ |
||
13 | 13 | public readonly string $id, |
14 | 14 | public readonly mixed $payload, |
15 | 15 | public readonly array $headers = [] |
16 | - ) { |
|
16 | + ){ |
|
17 | 17 | } |
18 | 18 | } |
@@ -13,6 +13,6 @@ |
||
13 | 13 | public readonly string $id, |
14 | 14 | public readonly mixed $payload, |
15 | 15 | public readonly array $headers = [] |
16 | - ) { |
|
16 | + ){ |
|
17 | 17 | } |
18 | 18 | } |
@@ -21,7 +21,7 @@ |
||
21 | 21 | public function __construct( |
22 | 22 | private readonly CoreInterface $core, |
23 | 23 | ?TracerFactoryInterface $tracerFactory = null, |
24 | - ) { |
|
24 | + ){ |
|
25 | 25 | $this->tracerFactory = $tracerFactory ?? new NullTracerFactory(new Container()); |
26 | 26 | } |
27 | 27 |
@@ -19,20 +19,20 @@ |
||
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, mixed $payload, array $headers = []): void |
26 | 26 | { |
27 | - try { |
|
27 | + try{ |
|
28 | 28 | $params = ['payload' => $payload, 'id' => $id, 'headers' => $headers]; |
29 | 29 | |
30 | - if (\is_array($payload)) { |
|
30 | + if (\is_array($payload)){ |
|
31 | 31 | $params = \array_merge($params, $payload); |
32 | 32 | } |
33 | 33 | |
34 | 34 | $this->invoker->invoke([$this, $this->getHandlerMethod()], $params); |
35 | - } catch (\Throwable $e) { |
|
35 | + }catch (\Throwable $e){ |
|
36 | 36 | $message = \sprintf('[%s] %s', $this::class, $e->getMessage()); |
37 | 37 | throw new JobException($message, (int)$e->getCode(), $e); |
38 | 38 | } |
@@ -24,15 +24,19 @@ |
||
24 | 24 | |
25 | 25 | public function handle(string $name, string $id, mixed $payload, array $headers = []): void |
26 | 26 | { |
27 | - try { |
|
27 | + try |
|
28 | + { |
|
28 | 29 | $params = ['payload' => $payload, 'id' => $id, 'headers' => $headers]; |
29 | 30 | |
30 | - if (\is_array($payload)) { |
|
31 | + if (\is_array($payload)) |
|
32 | + { |
|
31 | 33 | $params = \array_merge($params, $payload); |
32 | 34 | } |
33 | 35 | |
34 | 36 | $this->invoker->invoke([$this, $this->getHandlerMethod()], $params); |
35 | - } catch (\Throwable $e) { |
|
37 | + } |
|
38 | + catch (\Throwable $e) |
|
39 | + { |
|
36 | 40 | $message = \sprintf('[%s] %s', $this::class, $e->getMessage()); |
37 | 41 | throw new JobException($message, (int)$e->getCode(), $e); |
38 | 42 | } |
@@ -13,7 +13,7 @@ |
||
13 | 13 | |
14 | 14 | final class ContainerRegistryT extends TestCase |
15 | 15 | { |
16 | - private ContainerInterface|m\MockInterface $container; |
|
16 | + private ContainerInterface | m\MockInterface $container; |
|
17 | 17 | private ContainerRegistry $registry; |
18 | 18 | |
19 | 19 | protected function setUp(): void |
@@ -24,7 +24,7 @@ |
||
24 | 24 | $handler = m::mock(FailedJobHandlerInterface::class) |
25 | 25 | ); |
26 | 26 | |
27 | - if (!\is_array($payload)) { |
|
27 | + if (!\is_array($payload)){ |
|
28 | 28 | $this->markTestIncomplete('FailedJobHandlerInterface does not support non-array payloads'); |
29 | 29 | return; |
30 | 30 | } |
@@ -24,7 +24,8 @@ |
||
24 | 24 | $handler = m::mock(FailedJobHandlerInterface::class) |
25 | 25 | ); |
26 | 26 | |
27 | - if (!\is_array($payload)) { |
|
27 | + if (!\is_array($payload)) |
|
28 | + { |
|
28 | 29 | $this->markTestIncomplete('FailedJobHandlerInterface does not support non-array payloads'); |
29 | 30 | return; |
30 | 31 | } |