@@ -90,15 +90,15 @@ discard block |
||
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 | try { |
98 | 98 | $this->channel->wait(null, false, $timeout); |
99 | - } catch(AMQPTimeoutException $e) { |
|
99 | + } catch (AMQPTimeoutException $e) { |
|
100 | 100 | throw new TimeoutReaderException("Timed out at $timeout seconds while reading.", 0, $e); |
101 | - } catch(\Exception $e) { |
|
101 | + } catch (\Exception $e) { |
|
102 | 102 | throw new ReaderException("Error occurred while reading", 0, $e); |
103 | 103 | } |
104 | 104 | } |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | */ |
109 | 109 | protected function initialize() |
110 | 110 | { |
111 | - if($this->channel) { |
|
111 | + if ($this->channel) { |
|
112 | 112 | return; |
113 | 113 | } |
114 | 114 | $this->logger->info('Connecting to RabbitMQ'); |
@@ -27,6 +27,6 @@ |
||
27 | 27 | throw new InvalidJSONTaskException("Cannot reconstruct task. Name or body fields are missing"); |
28 | 28 | } |
29 | 29 | |
30 | - return new Task($taskArray['name'], $taskArray['body'], isset($taskArray['delay']) ? $taskArray['delay'] : 0); |
|
30 | + return new Task($taskArray['name'], $taskArray['body'], isset($taskArray['delay']) ? $taskArray['delay'] : 0); |
|
31 | 31 | } |
32 | 32 | } |
33 | 33 | \ No newline at end of file |