@@ -42,12 +42,12 @@ |
||
42 | 42 | */ |
43 | 43 | public function push(string $jobType, array $payload = [], Options $options = null): string |
44 | 44 | { |
45 | - if ($options === null) { |
|
45 | + if ($options === null){ |
|
46 | 46 | $options = new Options(); |
47 | 47 | } |
48 | 48 | |
49 | 49 | $pipeline = $this->registry->getPipeline($jobType); |
50 | - if ($pipeline !== null && $options->getPipeline() === null) { |
|
50 | + if ($pipeline !== null && $options->getPipeline() === null){ |
|
51 | 51 | $options = $options->withPipeline($pipeline); |
52 | 52 | } |
53 | 53 |
@@ -42,12 +42,14 @@ |
||
42 | 42 | */ |
43 | 43 | public function push(string $jobType, array $payload = [], Options $options = null): string |
44 | 44 | { |
45 | - if ($options === null) { |
|
45 | + if ($options === null) |
|
46 | + { |
|
46 | 47 | $options = new Options(); |
47 | 48 | } |
48 | 49 | |
49 | 50 | $pipeline = $this->registry->getPipeline($jobType); |
50 | - if ($pipeline !== null && $options->getPipeline() === null) { |
|
51 | + if ($pipeline !== null && $options->getPipeline() === null) |
|
52 | + { |
|
51 | 53 | $options = $options->withPipeline($pipeline); |
52 | 54 | } |
53 | 55 |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | ContainerInterface $container, |
46 | 46 | HandlerRegistryInterface $handlers, |
47 | 47 | SerializerRegistryInterface $serializers |
48 | - ) { |
|
48 | + ){ |
|
49 | 49 | $this->container = $container; |
50 | 50 | $this->fallbackHandlers = $handlers; |
51 | 51 | $this->fallbackSerializers = $serializers; |
@@ -66,8 +66,8 @@ discard block |
||
66 | 66 | */ |
67 | 67 | public function getHandler(string $jobType): HandlerInterface |
68 | 68 | { |
69 | - if (isset($this->handlers[$jobType])) { |
|
70 | - if ($this->handlers[$jobType] instanceof HandlerInterface) { |
|
69 | + if (isset($this->handlers[$jobType])){ |
|
70 | + if ($this->handlers[$jobType] instanceof HandlerInterface){ |
|
71 | 71 | return $this->handlers[$jobType]; |
72 | 72 | } |
73 | 73 | |
@@ -92,20 +92,20 @@ discard block |
||
92 | 92 | */ |
93 | 93 | public function getSerializer(string $jobType): SerializerInterface |
94 | 94 | { |
95 | - if (isset($this->serializers[$jobType])) { |
|
96 | - if ($this->serializers[$jobType] instanceof SerializerInterface) { |
|
95 | + if (isset($this->serializers[$jobType])){ |
|
96 | + if ($this->serializers[$jobType] instanceof SerializerInterface){ |
|
97 | 97 | return $this->serializers[$jobType]; |
98 | 98 | } |
99 | 99 | |
100 | 100 | return $this->container->get($this->serializers[$jobType]); |
101 | 101 | } |
102 | 102 | |
103 | - if (!isset($this->handlers[$jobType])) { |
|
103 | + if (!isset($this->handlers[$jobType])){ |
|
104 | 104 | return $this->fallbackSerializers->getSerializer($jobType); |
105 | 105 | } |
106 | 106 | |
107 | 107 | $handler = $this->getHandler($jobType); |
108 | - if ($handler instanceof SerializerInterface) { |
|
108 | + if ($handler instanceof SerializerInterface){ |
|
109 | 109 | return $handler; |
110 | 110 | } |
111 | 111 |
@@ -66,8 +66,10 @@ discard block |
||
66 | 66 | */ |
67 | 67 | public function getHandler(string $jobType): HandlerInterface |
68 | 68 | { |
69 | - if (isset($this->handlers[$jobType])) { |
|
70 | - if ($this->handlers[$jobType] instanceof HandlerInterface) { |
|
69 | + if (isset($this->handlers[$jobType])) |
|
70 | + { |
|
71 | + if ($this->handlers[$jobType] instanceof HandlerInterface) |
|
72 | + { |
|
71 | 73 | return $this->handlers[$jobType]; |
72 | 74 | } |
73 | 75 | |
@@ -92,20 +94,24 @@ discard block |
||
92 | 94 | */ |
93 | 95 | public function getSerializer(string $jobType): SerializerInterface |
94 | 96 | { |
95 | - if (isset($this->serializers[$jobType])) { |
|
96 | - if ($this->serializers[$jobType] instanceof SerializerInterface) { |
|
97 | + if (isset($this->serializers[$jobType])) |
|
98 | + { |
|
99 | + if ($this->serializers[$jobType] instanceof SerializerInterface) |
|
100 | + { |
|
97 | 101 | return $this->serializers[$jobType]; |
98 | 102 | } |
99 | 103 | |
100 | 104 | return $this->container->get($this->serializers[$jobType]); |
101 | 105 | } |
102 | 106 | |
103 | - if (!isset($this->handlers[$jobType])) { |
|
107 | + if (!isset($this->handlers[$jobType])) |
|
108 | + { |
|
104 | 109 | return $this->fallbackSerializers->getSerializer($jobType); |
105 | 110 | } |
106 | 111 | |
107 | 112 | $handler = $this->getHandler($jobType); |
108 | - if ($handler instanceof SerializerInterface) { |
|
113 | + if ($handler instanceof SerializerInterface) |
|
114 | + { |
|
109 | 115 | return $handler; |
110 | 116 | } |
111 | 117 |