@@ -33,6 +33,7 @@ |
||
33 | 33 | |
34 | 34 | /** |
35 | 35 | * Reconnect the entity |
36 | + * @return void |
|
36 | 37 | */ |
37 | 38 | public function reconnect(); |
38 | 39 | } |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | * |
30 | 30 | * @var string |
31 | 31 | */ |
32 | - protected $description = 'Create all queues, exchanges and binds that are defined in entities AND referenced to' . |
|
32 | + protected $description = 'Create all queues, exchanges and binds that are defined in entities AND referenced to'. |
|
33 | 33 | ' either a publisher or a consumer'; |
34 | 34 | |
35 | 35 | /** |
@@ -64,8 +64,8 @@ discard block |
||
64 | 64 | $this->output->writeln( |
65 | 65 | sprintf( |
66 | 66 | "Deleting <info>%s</info> <fg=yellow>%s</>", |
67 | - (string)($entity instanceof QueueEntity) ? 'QUEUE' : 'EXCHANGE', |
|
68 | - (string)$entity->getAliasName() |
|
67 | + (string) ($entity instanceof QueueEntity) ? 'QUEUE' : 'EXCHANGE', |
|
68 | + (string) $entity->getAliasName() |
|
69 | 69 | ) |
70 | 70 | ); |
71 | 71 | $entity->delete(); |
@@ -75,10 +75,10 @@ discard block |
||
75 | 75 | $this->output->writeln( |
76 | 76 | sprintf( |
77 | 77 | "Created <info>%s</info> <fg=yellow>%s</> for %s [<fg=yellow>%s</>]", |
78 | - (string)($entity instanceof QueueEntity) ? 'QUEUE' : 'EXCHANGE', |
|
79 | - (string)$entity->getAliasName(), |
|
80 | - (string)$type, |
|
81 | - (string)$resourceName |
|
78 | + (string) ($entity instanceof QueueEntity) ? 'QUEUE' : 'EXCHANGE', |
|
79 | + (string) $entity->getAliasName(), |
|
80 | + (string) $type, |
|
81 | + (string) $resourceName |
|
82 | 82 | ) |
83 | 83 | ); |
84 | 84 | } |
@@ -100,9 +100,9 @@ discard block |
||
100 | 100 | $this->output->error( |
101 | 101 | sprintf( |
102 | 102 | "Could not create entity %s for publisher [%s], got:\n%s", |
103 | - (string)$entity->getAliasName(), |
|
104 | - (string)$publisherName, |
|
105 | - (string)$e->getMessage() |
|
103 | + (string) $entity->getAliasName(), |
|
104 | + (string) $publisherName, |
|
105 | + (string) $e->getMessage() |
|
106 | 106 | ) |
107 | 107 | ); |
108 | 108 | $entity->reconnect(); |
@@ -118,9 +118,9 @@ discard block |
||
118 | 118 | $this->output->error( |
119 | 119 | sprintf( |
120 | 120 | "Could not create entity %s for consumer [%s], got:\n%s", |
121 | - (string)$entity->getAliasName(), |
|
122 | - (string)$publisherName, |
|
123 | - (string)$e->getMessage() |
|
121 | + (string) $entity->getAliasName(), |
|
122 | + (string) $publisherName, |
|
123 | + (string) $e->getMessage() |
|
124 | 124 | ) |
125 | 125 | ); |
126 | 126 | $entity->reconnect(); |
@@ -135,8 +135,8 @@ discard block |
||
135 | 135 | $this->output->writeln( |
136 | 136 | sprintf( |
137 | 137 | "Created bind <info>%s</info> for publisher [<fg=yellow>%s</>]", |
138 | - (string)$entity->getAliasName(), |
|
139 | - (string)$publisherName |
|
138 | + (string) $entity->getAliasName(), |
|
139 | + (string) $publisherName |
|
140 | 140 | ) |
141 | 141 | ); |
142 | 142 | } catch (\Exception $e) { |
@@ -144,9 +144,9 @@ discard block |
||
144 | 144 | $this->output->error( |
145 | 145 | sprintf( |
146 | 146 | "Could not bind entity %s for publisher [%s], got:\n%s", |
147 | - (string)$entity->getAliasName(), |
|
148 | - (string)$publisherName, |
|
149 | - (string)$e->getMessage() |
|
147 | + (string) $entity->getAliasName(), |
|
148 | + (string) $publisherName, |
|
149 | + (string) $e->getMessage() |
|
150 | 150 | ) |
151 | 151 | ); |
152 | 152 | } |
@@ -159,8 +159,8 @@ discard block |
||
159 | 159 | $this->output->writeln( |
160 | 160 | sprintf( |
161 | 161 | "Bind entity <info>%s</info> for consumer [<fg=yellow>%s</>]", |
162 | - (string)$entity->getAliasName(), |
|
163 | - (string)$consumerAliasName |
|
162 | + (string) $entity->getAliasName(), |
|
163 | + (string) $consumerAliasName |
|
164 | 164 | ) |
165 | 165 | ); |
166 | 166 | } catch (\Exception $e) { |
@@ -168,13 +168,13 @@ discard block |
||
168 | 168 | $this->output->error( |
169 | 169 | sprintf( |
170 | 170 | "Could not create bind %s for consumer [%s], got:\n%s", |
171 | - (string)$entity->getAliasName(), |
|
172 | - (string)$consumerAliasName, |
|
173 | - (string)$e->getMessage() |
|
171 | + (string) $entity->getAliasName(), |
|
172 | + (string) $consumerAliasName, |
|
173 | + (string) $e->getMessage() |
|
174 | 174 | ) |
175 | 175 | ); |
176 | 176 | } |
177 | 177 | } |
178 | - return (int)$hasErrors; |
|
178 | + return (int) $hasErrors; |
|
179 | 179 | } |
180 | 180 | } |