@@ -109,7 +109,7 @@ |
||
109 | 109 | $skippedAttributes = array('timestamp', 'headers', 'app_id', 'routing_key'); |
110 | 110 | foreach($attributes as $attributeName => $value) |
111 | 111 | { |
112 | - if(! in_array($attributeName, $skippedAttributes)) |
|
112 | + if( ! in_array($attributeName, $skippedAttributes)) |
|
113 | 113 | { |
114 | 114 | $writable->setAttribute($attributeName, $value); |
115 | 115 | } |
@@ -103,6 +103,9 @@ discard block |
||
103 | 103 | $this->theMessageIs(self::JSON_ROUTING_KEY, ContentType::JSON); |
104 | 104 | } |
105 | 105 | |
106 | + /** |
|
107 | + * @param string $routingKey |
|
108 | + */ |
|
106 | 109 | private function theMessageIs($routingKey, $contentType) |
107 | 110 | { |
108 | 111 | $firstMessage = $this->consumedMessages[0]; |
@@ -145,6 +148,9 @@ discard block |
||
145 | 148 | $this->oneOfTheMessagesIs(ContentType::JSON, self::JSON_ROUTING_KEY); |
146 | 149 | } |
147 | 150 | |
151 | + /** |
|
152 | + * @param string $routingKey |
|
153 | + */ |
|
148 | 154 | private function oneOfTheMessagesIs($contentType, $routingKey) |
149 | 155 | { |
150 | 156 | $found = null; |
@@ -28,7 +28,7 @@ |
||
28 | 28 | |
29 | 29 | foreach($this->headers as $header => $value) |
30 | 30 | { |
31 | - if(! isset($alreadySetHeaders[$header])) |
|
31 | + if( ! isset($alreadySetHeaders[$header])) |
|
32 | 32 | { |
33 | 33 | $message->addHeader($header, $value); |
34 | 34 | } |
@@ -51,7 +51,7 @@ |
||
51 | 51 | 'retry_key_pattern' => sprintf(self::RETRY_ROUTING_KEY_PATTERN, $workerContext->getQueueName()), |
52 | 52 | ); |
53 | 53 | |
54 | - if(! empty($this->retries)) |
|
54 | + if( ! empty($this->retries)) |
|
55 | 55 | { |
56 | 56 | $options['retry_attempts'] = $this->retries; |
57 | 57 | } |
@@ -19,7 +19,7 @@ |
||
19 | 19 | { |
20 | 20 | $this->originalMessage = $originalMessage; |
21 | 21 | |
22 | - $this->newRoutingKey= $originalMessage->getRoutingKey(); |
|
22 | + $this->newRoutingKey = $originalMessage->getRoutingKey(); |
|
23 | 23 | $this->newBody = null; |
24 | 24 | |
25 | 25 | $this->newAttributeValues = []; |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | */ |
41 | 41 | public function setCompressionLevel($compressionLevel = -1) |
42 | 42 | { |
43 | - if(! $this->isCompressionLevelValid($compressionLevel)) |
|
43 | + if( ! $this->isCompressionLevelValid($compressionLevel)) |
|
44 | 44 | { |
45 | 45 | $this->logWarning(sprintf( |
46 | 46 | "Invalid compression level (%s)", |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | |
72 | 72 | public function setEncodingMode($mode) |
73 | 73 | { |
74 | - if(! is_scalar($mode) || ! in_array($mode, [FORCE_GZIP, FORCE_DEFLATE])) |
|
74 | + if( ! is_scalar($mode) || ! in_array($mode, [FORCE_GZIP, FORCE_DEFLATE])) |
|
75 | 75 | { |
76 | 76 | $this->logWarning(sprintf( |
77 | 77 | "Invalid encoding mode (%s)", |