@@ -96,19 +96,19 @@ discard block |
||
96 | 96 | * @throws ReaderException |
97 | 97 | * @throws TimeoutReaderException |
98 | 98 | */ |
99 | - public function read(callable $callback, $timeout=0) |
|
99 | + public function read(callable $callback, $timeout = 0) |
|
100 | 100 | { |
101 | 101 | $this->initialize(); |
102 | 102 | $this->messageHandler->setCallback($callback); |
103 | 103 | |
104 | 104 | try { |
105 | 105 | $this->consume($timeout); |
106 | - } catch(GracefulStopException $e) { |
|
106 | + } catch (GracefulStopException $e) { |
|
107 | 107 | $this->stopConsuming(); |
108 | - } catch(AMQPTimeoutException $e) { |
|
108 | + } catch (AMQPTimeoutException $e) { |
|
109 | 109 | $this->stopConsuming(); |
110 | 110 | throw new TimeoutReaderException("Timed out at $timeout seconds while reading.", 0, $e); |
111 | - } catch(\Exception $e) { |
|
111 | + } catch (\Exception $e) { |
|
112 | 112 | $this->stopConsuming(); |
113 | 113 | throw new ReaderException("Error occurred while reading", 0, $e); |
114 | 114 | } |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | protected function consume($timeout) |
168 | 168 | { |
169 | 169 | if ($this->consumerTag === '') { |
170 | - $this->logger->debug('Waiting for messages on queue:'.$this->queueConfig->getName()); |
|
170 | + $this->logger->debug('Waiting for messages on queue:' . $this->queueConfig->getName()); |
|
171 | 171 | $this->consumerTag = $this->channel->basic_consume( |
172 | 172 | $this->queueConfig->getName(), |
173 | 173 | '', |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | if ($this->consumerTag) { |
209 | 209 | try { |
210 | 210 | $this->channel->basic_cancel($this->consumerTag); |
211 | - } catch(\Exception $e) { |
|
211 | + } catch (\Exception $e) { |
|
212 | 212 | } |
213 | 213 | |
214 | 214 | $this->consumerTag = ''; |