Completed
Pull Request — master (#17)
by Nicolas
05:50
created
src/Messages/Message.php 1 patch
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -27,6 +27,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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))
Please login to merge, or discard this patch.
src/Workers/MessageAdapter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@
 block discarded – undo
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
             }
Please login to merge, or discard this patch.
features/bootstrap/ConsumeContext.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -143,6 +143,9 @@
 block discarded – undo
143 143
         $this->oneOfTheMessagesIs(ContentType::JSON, self::JSON_ROUTING_KEY);
144 144
     }
145 145
     
146
+    /**
147
+     * @param string $routingKey
148
+     */
146 149
     private function oneOfTheMessagesIs($contentType, $routingKey)
147 150
     {
148 151
         $found = null;
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,5 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-use Behat\Behat\Tester\Exception\PendingException;
4 3
 use Puzzle\AMQP\Messages\Message;
5 4
 use Puzzle\AMQP\Consumers\Insomniac;
6 5
 use Puzzle\AMQP\Workers\Worker;
Please login to merge, or discard this patch.