Completed
Pull Request — master (#9)
by Marc
06:42
created
src/Cmp/Queues/Domain/Task/Consumer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,12 +25,12 @@
 block discarded – undo
25 25
      * @param callable $callback Callable that'll be invoked when a message is received
26 26
      * @param int      $timeout (optional) If specified, the process will block a max of $timeout seconds. Indefinitely if 0
27 27
      */
28
-    public function consume(callable $callback, $timeout=0)
28
+    public function consume(callable $callback, $timeout = 0)
29 29
     {
30
-        while(true) {
30
+        while (true) {
31 31
             try {
32 32
                 $this->consumeOnce($callback, $timeout);
33
-            } catch(TimeoutReaderException $e) {
33
+            } catch (TimeoutReaderException $e) {
34 34
                 break;
35 35
             }
36 36
         }
Please login to merge, or discard this patch.
src/Cmp/Queues/Domain/Queue/QueueReader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
      * @throws ReaderException
18 18
      * @return void
19 19
      */
20
-    public function read(callable $callback, $timeout=0);
20
+    public function read(callable $callback, $timeout = 0);
21 21
 
22 22
     /**
23 23
      * Deletes all messages from the queue
Please login to merge, or discard this patch.
src/Cmp/Queues/Infrastructure/AmqpLib/v26/RabbitMQ/Queue/QueueReader.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -90,16 +90,16 @@
 block discarded – undo
90 90
      * @throws ReaderException
91 91
      * @throws TimeoutReaderException
92 92
      */
93
-    public function read(callable $callback, $timeout=0)
93
+    public function read(callable $callback, $timeout = 0)
94 94
     {
95 95
         $this->initialize();
96 96
         $this->messageHandler->setCallback($callback);
97 97
 
98 98
         try {
99 99
             $this->consume($timeout);
100
-        } catch(AMQPTimeoutException $e) {
100
+        } catch (AMQPTimeoutException $e) {
101 101
             throw new TimeoutReaderException("Timed out at $timeout seconds while reading.", 0, $e);
102
-        } catch(\Exception $e) {
102
+        } catch (\Exception $e) {
103 103
             throw new ReaderException("Error occurred while reading", 0, $e);
104 104
         } finally {
105 105
             $this->channel->basic_cancel('');
Please login to merge, or discard this patch.