| @@ -40,8 +40,8 @@ | ||
| 40 | 40 | protected function execute(InputInterface $input, OutputInterface $output) | 
| 41 | 41 |      { | 
| 42 | 42 | /** | 
| 43 | - * set context inside container | |
| 44 | - */ | |
| 43 | + * set context inside container | |
| 44 | + */ | |
| 45 | 45 | $this->container->register(new LoggerProvider($output)); | 
| 46 | 46 | |
| 47 | 47 | $parser = new ParseExpertConfig(); | 
| @@ -22,7 +22,7 @@ discard block | ||
| 22 | 22 | $rootNode | 
| 23 | 23 | ->validate() | 
| 24 | 24 | ->always() | 
| 25 | -                ->then(function($v){ | |
| 25 | +                ->then(function($v) { | |
| 26 | 26 | /** | 
| 27 | 27 | * ensure that connections are correctly declared between vhosts and connection | 
| 28 | 28 | */ | 
| @@ -57,7 +57,7 @@ discard block | ||
| 57 | 57 |                      ->useAttributeAsKey('name') | 
| 58 | 58 |                      ->prototype('array') | 
| 59 | 59 | ->validate() | 
| 60 | -                            ->ifTrue(function($v){ return count($v['queues']) > 0;}) | |
| 60 | +                            ->ifTrue(function($v) { return count($v['queues']) > 0; }) | |
| 61 | 61 |                              ->then(function($v) { | 
| 62 | 62 |                                  foreach ($v['queues'] as $name => $config) { | 
| 63 | 63 |                                      if (isset($config['bindings'])) { | 
| @@ -107,8 +107,8 @@ discard block | ||
| 107 | 107 | |
| 108 | 108 | $node | 
| 109 | 109 | ->validate() | 
| 110 | -                ->ifTrue(function($v) {return isset($v['federation-upstream-set']);}) | |
| 111 | -                ->then(function($v){ | |
| 110 | +                ->ifTrue(function($v) {return isset($v['federation-upstream-set']); }) | |
| 111 | +                ->then(function($v) { | |
| 112 | 112 | /** | 
| 113 | 113 | * Verify all server name use in federation-upstream-set | 
| 114 | 114 | * were declared in federation-upstream | 
| @@ -143,10 +143,10 @@ discard block | ||
| 143 | 143 |                              ->scalarNode('expires') | 
| 144 | 144 | ->validate() | 
| 145 | 145 | ->always() | 
| 146 | -                                    ->then(function($value){ | |
| 146 | +                                    ->then(function($value) { | |
| 147 | 147 |                                          if (!$value) { | 
| 148 | 148 | return null; | 
| 149 | -                                        } elseif (is_int($value)){ | |
| 149 | +                                        } elseif (is_int($value)) { | |
| 150 | 150 | return (int) $value; | 
| 151 | 151 | } | 
| 152 | 152 | |
| @@ -161,10 +161,10 @@ discard block | ||
| 161 | 161 |                              ->scalarNode('message-ttl') | 
| 162 | 162 | ->validate() | 
| 163 | 163 | ->always() | 
| 164 | -                                    ->then(function($value){ | |
| 164 | +                                    ->then(function($value) { | |
| 165 | 165 |                                          if (!$value) { | 
| 166 | 166 | return null; | 
| 167 | -                                        } elseif (is_int($value)){ | |
| 167 | +                                        } elseif (is_int($value)) { | |
| 168 | 168 | return (int) $value; | 
| 169 | 169 | } | 
| 170 | 170 | |
| @@ -29,7 +29,7 @@ | ||
| 29 | 29 | public function register(Container $container) | 
| 30 | 30 |      { | 
| 31 | 31 | $container['command_output'] = $this->output; | 
| 32 | -        $container['logger'] = function($c){ | |
| 32 | +        $container['logger'] = function($c) { | |
| 33 | 33 | return new ConsoleLogger( | 
| 34 | 34 | $c['command_output'], | 
| 35 | 35 | [LogLevel::INFO => OutputInterface::VERBOSITY_NORMAL], | 
| @@ -55,8 +55,8 @@ | ||
| 55 | 55 | $this->setMethodOption($method) | 
| 56 | 56 | ); | 
| 57 | 57 | |
| 58 | - if (ClientInterface::METHOD_GET !==$method | |
| 59 | - && ClientInterface::METHOD_DELETE !==$method | |
| 58 | + if (ClientInterface::METHOD_GET !== $method | |
| 59 | + && ClientInterface::METHOD_DELETE !== $method | |
| 60 | 60 |              && !empty($parameters)) { | 
| 61 | 61 | $options['CURLOPT_POSTFIELDS'] = json_encode($parameters); | 
| 62 | 62 | } | 
| @@ -64,7 +64,7 @@ discard block | ||
| 64 | 64 |          } else { | 
| 65 | 65 | //few queues to delete, let stack them in array | 
| 66 | 66 |              $queues = explode(',', $queues); | 
| 67 | -            array_walk($queues, function(&$item, $key, $vhost){ | |
| 67 | +            array_walk($queues, function(&$item, $key, $vhost) { | |
| 68 | 68 | $item = ['vhost' => $vhost, 'name' => trim($item)]; | 
| 69 | 69 | }, $vhost); | 
| 70 | 70 | } | 
| @@ -101,7 +101,7 @@ discard block | ||
| 101 | 101 |          } else { | 
| 102 | 102 | //few exchanges to delete, let stack them in array | 
| 103 | 103 |              $exchanges = explode(',', $exchanges); | 
| 104 | -            array_walk($exchanges, function(&$item, $key, $vhost){ | |
| 104 | +            array_walk($exchanges, function(&$item, $key, $vhost) { | |
| 105 | 105 | $item = ['vhost' => $vhost, 'name' => trim($item)]; | 
| 106 | 106 | }, $vhost); | 
| 107 | 107 | } | 
| @@ -128,7 +128,7 @@ discard block | ||
| 128 | 128 |          } else { | 
| 129 | 129 | //few policies to delete, let stack them in array | 
| 130 | 130 |              $policies = explode(',', $policies); | 
| 131 | -            array_walk($policies, function(&$item, $key, $vhost){ | |
| 131 | +            array_walk($policies, function(&$item, $key, $vhost) { | |
| 132 | 132 | $item = ['vhost' => $vhost, 'name' => trim($item)]; | 
| 133 | 133 | }, $vhost); | 
| 134 | 134 | } | 
| @@ -33,7 +33,7 @@ | ||
| 33 | 33 | $options); | 
| 34 | 34 |          $this->logger->info(sprintf('Create queue: <info>%s</info>', $queueName)); | 
| 35 | 35 | |
| 36 | -        foreach($bindings as $binding) { | |
| 36 | +        foreach ($bindings as $binding) { | |
| 37 | 37 | $this->client->query( | 
| 38 | 38 | ClientInterface::METHOD_POST, | 
| 39 | 39 |                  sprintf('/api/bindings/%s/e/%s/q/%s', $this->vhost, $binding['exchange'], $queueName), |