@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | * @param int $delay |
29 | 29 | * @throws TaskException |
30 | 30 | */ |
31 | - public function __construct($name, array $body, $delay=0) |
|
31 | + public function __construct($name, array $body, $delay = 0) |
|
32 | 32 | { |
33 | 33 | $this->setName($name) |
34 | 34 | ->setDelay($delay) |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | */ |
68 | 68 | protected function setName($name) |
69 | 69 | { |
70 | - if(empty($name)) { |
|
70 | + if (empty($name)) { |
|
71 | 71 | throw new TaskException('Task name cannot be empty'); |
72 | 72 | } |
73 | 73 | $this->name = $name; |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | */ |
82 | 82 | protected function setDelay($delay) |
83 | 83 | { |
84 | - if(!is_null($delay) && !preg_match('/^\d+$/', $delay)) { |
|
84 | + if (!is_null($delay) && !preg_match('/^\d+$/', $delay)) { |
|
85 | 85 | throw new TaskException("Task delay $delay is not a valid delay."); |
86 | 86 | } |
87 | 87 | $this->delay = $delay; |
@@ -63,7 +63,7 @@ |
||
63 | 63 | 'Message' => json_encode($message), |
64 | 64 | 'MessageAttributes' => $message->getAttributes() |
65 | 65 | ]); |
66 | - } catch(\Exception $e) { |
|
66 | + } catch (\Exception $e) { |
|
67 | 67 | $this->logger->error('Error writing messages', ['exception' => $e]); |
68 | 68 | throw new WriterException($e->getMessage(), $e->getCode()); |
69 | 69 | } |