@@ -72,7 +72,7 @@ |
||
| 72 | 72 | user=www-data |
| 73 | 73 | autostart=$autostart |
| 74 | 74 | autorestart=$autorestart |
| 75 | -TXT; |
|
| 75 | +txt; |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | private function booleanToString($value) |
@@ -78,7 +78,7 @@ |
||
| 78 | 78 | { |
| 79 | 79 | $value = $input->getOption($name); |
| 80 | 80 | |
| 81 | - if(! in_array($value, ['true', 'false'])) |
|
| 81 | + if( ! in_array($value, ['true', 'false'])) |
|
| 82 | 82 | { |
| 83 | 83 | throw new \InvalidArgumentException(sprintf('Invalid value "%s" for option %s, expecting boolean.', $value, $name)); |
| 84 | 84 | } |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | { |
| 36 | 36 | $exchangeParts = []; |
| 37 | 37 | |
| 38 | - if(! empty($this->exchangesPrefix)) |
|
| 38 | + if( ! empty($this->exchangesPrefix)) |
|
| 39 | 39 | { |
| 40 | 40 | $exchangeParts[] = trim($this->exchangesPrefix); |
| 41 | 41 | } |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | |
| 31 | 31 | private function ensureIsConnected() |
| 32 | 32 | { |
| 33 | - if(! $this->channel instanceof \AMQPChannel) |
|
| 33 | + if( ! $this->channel instanceof \AMQPChannel) |
|
| 34 | 34 | { |
| 35 | 35 | $configuration = new PrefixedConfiguration($this->configuration, 'amqp/broker'); |
| 36 | 36 | |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | |
| 109 | 109 | $ex = new \AMQPExchange($this->channel); |
| 110 | 110 | |
| 111 | - if(!empty($exchangeName)) |
|
| 111 | + if( ! empty($exchangeName)) |
|
| 112 | 112 | { |
| 113 | 113 | $ex->setName($exchangeName); |
| 114 | 114 | $ex->setType($type); |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | |
| 33 | 33 | public function changeContent($content) |
| 34 | 34 | { |
| 35 | - if(! is_array($content)) |
|
| 35 | + if( ! is_array($content)) |
|
| 36 | 36 | { |
| 37 | 37 | $content = array($content); |
| 38 | 38 | } |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | */ |
| 13 | 13 | public static function build($routingKey, Body $body = null, array $additionalHeaders = [], array $additionalAttributes = []) |
| 14 | 14 | { |
| 15 | - if(! $body instanceof Body) |
|
| 15 | + if( ! $body instanceof Body) |
|
| 16 | 16 | { |
| 17 | 17 | $body = new NullBody(); |
| 18 | 18 | } |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | { |
| 45 | 45 | $queueNameParts = []; |
| 46 | 46 | |
| 47 | - if(! empty($this->queueNamePrefix)) |
|
| 47 | + if( ! empty($this->queueNamePrefix)) |
|
| 48 | 48 | { |
| 49 | 49 | $queueNameParts[] = trim($this->queueNamePrefix); |
| 50 | 50 | } |
@@ -109,7 +109,7 @@ |
||
| 109 | 109 | $skippedAttributes = array('timestamp', 'headers', 'app_id', 'routing_key'); |
| 110 | 110 | foreach($attributes as $attributeName => $value) |
| 111 | 111 | { |
| 112 | - if(! in_array($attributeName, $skippedAttributes)) |
|
| 112 | + if( ! in_array($attributeName, $skippedAttributes)) |
|
| 113 | 113 | { |
| 114 | 114 | $writable->setAttribute($attributeName, $value); |
| 115 | 115 | } |
@@ -69,7 +69,8 @@ |
||
| 69 | 69 | |
| 70 | 70 | public function __toString(): string |
| 71 | 71 | { |
| 72 | - try { |
|
| 72 | + try |
|
| 73 | + { |
|
| 73 | 74 | return Json::encode([ |
| 74 | 75 | 'routing_key' => $this->getRoutingKey(), |
| 75 | 76 | 'body' => (string) $this->body, |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | |
| 29 | 29 | foreach($this->headers as $header => $value) |
| 30 | 30 | { |
| 31 | - if(! isset($alreadySetHeaders[$header])) |
|
| 31 | + if( ! isset($alreadySetHeaders[$header])) |
|
| 32 | 32 | { |
| 33 | 33 | $message->addHeader($header, $value); |
| 34 | 34 | } |