| @@ -43,7 +43,7 @@ | ||
| 43 | 43 | |
| 44 | 44 | public function changeContent($content): void | 
| 45 | 45 |      { | 
| 46 | - if(! is_array($content)) | |
| 46 | + if( ! is_array($content)) | |
| 47 | 47 |          { | 
| 48 | 48 | $content = array($content); | 
| 49 | 49 | } | 
| @@ -45,7 +45,7 @@ discard block | ||
| 45 | 45 | |
| 46 | 46 | private function ensureIsConnected(): void | 
| 47 | 47 |      { | 
| 48 | - if(! $this->channel instanceof \AMQPChannel) | |
| 48 | + if( ! $this->channel instanceof \AMQPChannel) | |
| 49 | 49 |          { | 
| 50 | 50 | $configuration = new PrefixedConfiguration($this->configuration, 'amqp/broker'); | 
| 51 | 51 | |
| @@ -144,7 +144,7 @@ discard block | ||
| 144 | 144 | |
| 145 | 145 | $ex = new \AMQPExchange($this->channel); | 
| 146 | 146 | |
| 147 | - if(!empty($exchangeName)) | |
| 147 | + if( ! empty($exchangeName)) | |
| 148 | 148 |          { | 
| 149 | 149 | $ex->setName($exchangeName); | 
| 150 | 150 | $ex->setType($type); | 
| @@ -175,6 +175,9 @@ | ||
| 175 | 175 | return $this->headers; | 
| 176 | 176 | } | 
| 177 | 177 | |
| 178 | + /** | |
| 179 | + * @param string $value | |
| 180 | + */ | |
| 178 | 181 | public function setAttribute(string $attributeName, $value): WritableMessage | 
| 179 | 182 |      { | 
| 180 | 183 | if($attributeName !== 'headers') | 
| @@ -212,7 +212,8 @@ | ||
| 212 | 212 | |
| 213 | 213 | public function __toString(): string | 
| 214 | 214 |      { | 
| 215 | -        try { | |
| 215 | + try | |
| 216 | +        { | |
| 216 | 217 | return (string) Json::encode([ | 
| 217 | 218 | 'routing_key' => $this->getRoutingKey(), | 
| 218 | 219 | 'body' => (string) $this->body, |