@@ -27,6 +27,9 @@ discard block |
||
27 | 27 | $this->changeRoutingKey($routingKey); |
28 | 28 | } |
29 | 29 | |
30 | + /** |
|
31 | + * @param string $routingKey |
|
32 | + */ |
|
30 | 33 | public function changeRoutingKey($routingKey) |
31 | 34 | { |
32 | 35 | $this->setAttribute('routing_key', $routingKey); |
@@ -160,6 +163,9 @@ discard block |
||
160 | 163 | return $this->headers; |
161 | 164 | } |
162 | 165 | |
166 | + /** |
|
167 | + * @param string $attributeName |
|
168 | + */ |
|
163 | 169 | public function setAttribute($attributeName, $value) |
164 | 170 | { |
165 | 171 | if($attributeName !== 'headers') |
@@ -180,6 +186,9 @@ discard block |
||
180 | 186 | return $attributes['headers']; |
181 | 187 | } |
182 | 188 | |
189 | + /** |
|
190 | + * @param string $attributeName |
|
191 | + */ |
|
183 | 192 | public function getAttribute($attributeName) |
184 | 193 | { |
185 | 194 | if(array_key_exists($attributeName, $this->attributes)) |
@@ -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; |
@@ -55,11 +55,17 @@ discard block |
||
55 | 55 | return $this; |
56 | 56 | } |
57 | 57 | |
58 | + /** |
|
59 | + * @param integer $level |
|
60 | + */ |
|
58 | 61 | private function isCompressionLevelValid($level) |
59 | 62 | { |
60 | 63 | return is_numeric($level) && $level >= -1 && $level <= 9; |
61 | 64 | } |
62 | 65 | |
66 | + /** |
|
67 | + * @param string $message |
|
68 | + */ |
|
63 | 69 | private function logWarning($message) |
64 | 70 | { |
65 | 71 | $this->logger->warning(sprintf( |
@@ -98,6 +104,9 @@ discard block |
||
98 | 104 | $this->updateCompressedMessage($message, $compressedContent); |
99 | 105 | } |
100 | 106 | |
107 | + /** |
|
108 | + * @param string $compressedContent |
|
109 | + */ |
|
101 | 110 | private function updateCompressedMessage(WritableMessage $message, $compressedContent) |
102 | 111 | { |
103 | 112 | $message->addHeaders([ |
@@ -134,6 +143,9 @@ discard block |
||
134 | 143 | return false; |
135 | 144 | } |
136 | 145 | |
146 | + /** |
|
147 | + * @param string $uncompressedContent |
|
148 | + */ |
|
137 | 149 | private function updateUncompressedMessage(ReadableMessage $message, $uncompressedContent) |
138 | 150 | { |
139 | 151 | $builder = new ReadableMessageModifier($message); |