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