@@ -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'); |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | return new Task( |
| 31 | 31 | $taskArray['name'], $taskArray['body'], isset($taskArray['delay']) ? $taskArray['delay'] : 0 |
| 32 | 32 | ); |
| 33 | - } catch(TaskException $e) { |
|
| 33 | + } catch (TaskException $e) { |
|
| 34 | 34 | throw new InvalidJSONTaskException("Failed creating Task instance", 0, $e); |
| 35 | 35 | } |
| 36 | 36 | } |