@@ -17,7 +17,7 @@ |
||
| 17 | 17 | |
| 18 | 18 | public function load(array $configs, ContainerBuilder $container) |
| 19 | 19 | { |
| 20 | - $fileLocator = new FileLocator(__DIR__ . '/../Resources/config'); |
|
| 20 | + $fileLocator = new FileLocator(__DIR__.'/../Resources/config'); |
|
| 21 | 21 | $loader = new YamlFileLoader($container, $fileLocator); |
| 22 | 22 | $loader->load('rabbitmq.yml'); |
| 23 | 23 | |
@@ -44,19 +44,19 @@ |
||
| 44 | 44 | ->prototype('array') |
| 45 | 45 | ->children() |
| 46 | 46 | ->arrayNode('queue') |
| 47 | - ->children() |
|
| 48 | - ->scalarNode('name')->end() |
|
| 49 | - ->booleanNode('passive')->defaultFalse()->end() |
|
| 50 | - ->booleanNode('durable')->defaultTrue()->end() |
|
| 51 | - ->booleanNode('exclusive')->defaultFalse()->end() |
|
| 52 | - ->booleanNode('auto_delete')->defaultFalse()->end() |
|
| 53 | - ->booleanNode('nowait')->defaultFalse()->end() |
|
| 54 | - ->variableNode('arguments')->defaultNull()->end() |
|
| 55 | - ->scalarNode('ticket')->defaultNull()->end() |
|
| 56 | - ->arrayNode('routing_keys') |
|
| 47 | + ->children() |
|
| 48 | + ->scalarNode('name')->end() |
|
| 49 | + ->booleanNode('passive')->defaultFalse()->end() |
|
| 50 | + ->booleanNode('durable')->defaultTrue()->end() |
|
| 51 | + ->booleanNode('exclusive')->defaultFalse()->end() |
|
| 52 | + ->booleanNode('auto_delete')->defaultFalse()->end() |
|
| 53 | + ->booleanNode('nowait')->defaultFalse()->end() |
|
| 54 | + ->variableNode('arguments')->defaultNull()->end() |
|
| 55 | + ->scalarNode('ticket')->defaultNull()->end() |
|
| 56 | + ->arrayNode('routing_keys') |
|
| 57 | 57 | ->prototype('scalar')->end() |
| 58 | - ->end() |
|
| 59 | - ->end() |
|
| 58 | + ->end() |
|
| 59 | + ->end() |
|
| 60 | 60 | ->end() |
| 61 | 61 | ->scalarNode('class')->end() |
| 62 | 62 | ->arrayNode('arguments')->end() |
@@ -62,10 +62,10 @@ |
||
| 62 | 62 | $this->parameters['user'], |
| 63 | 63 | $this->parameters['password'], |
| 64 | 64 | $this->parameters['vhost'], |
| 65 | - false, // insist |
|
| 65 | + false, // insist |
|
| 66 | 66 | 'AMQPLAIN', // login_method |
| 67 | - null, // login_response |
|
| 68 | - 'en_US', // locale |
|
| 67 | + null, // login_response |
|
| 68 | + 'en_US', // locale |
|
| 69 | 69 | $this->parameters['connection_timeout'], |
| 70 | 70 | $this->parameters['read_write_timeout'], |
| 71 | 71 | $this->parameters['ssl_context'], |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | |
| 66 | 66 | if (!$service instanceof RpcServiceInterface) { |
| 67 | 67 | throw new InvalidRpcServerClassException( |
| 68 | - 'Failed start RpcServer: %s is not instance of RpcServiceInterface'. $serviceName |
|
| 68 | + 'Failed start RpcServer: %s is not instance of RpcServiceInterface'.$serviceName |
|
| 69 | 69 | ); |
| 70 | 70 | } |
| 71 | 71 | list( |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | ); |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | - while(count($this->getChannel()->callbacks)) { |
|
| 87 | + while (count($this->getChannel()->callbacks)) { |
|
| 88 | 88 | $this->getChannel()->wait(); |
| 89 | 89 | } |
| 90 | 90 | |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | */ |
| 31 | 31 | public function onResponse(AMQPMessage $rep) |
| 32 | 32 | { |
| 33 | - if($rep->get('correlation_id') == $this->correlationId) { |
|
| 33 | + if ($rep->get('correlation_id') == $this->correlationId) { |
|
| 34 | 34 | $this->response = $rep->body; |
| 35 | 35 | } |
| 36 | 36 | } |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | */ |
| 41 | 41 | public function call() |
| 42 | 42 | { |
| 43 | - list($callbackQueue, ,) = $this->getChannel()->queue_declare( |
|
| 43 | + list($callbackQueue,,) = $this->getChannel()->queue_declare( |
|
| 44 | 44 | '', false, false, true, false |
| 45 | 45 | ); |
| 46 | 46 | $this->callbackQueue = $callbackQueue; |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | ); |
| 61 | 61 | $this->getChannel()->basic_publish($msg, '', $this->getQueueName()); |
| 62 | 62 | |
| 63 | - while(!$this->response) { |
|
| 63 | + while (!$this->response) { |
|
| 64 | 64 | $this->getChannel()->wait(); |
| 65 | 65 | } |
| 66 | 66 | return $this->response; |
@@ -82,7 +82,7 @@ |
||
| 82 | 82 | } |
| 83 | 83 | /* Send to Message Broker */ |
| 84 | 84 | $this->handleRequest($body); |
| 85 | - $rpcResponse = $this->buildRpcResponseCollection(); |
|
| 85 | + $rpcResponse = $this->buildRpcResponseCollection(); |
|
| 86 | 86 | |
| 87 | 87 | return $rpcResponse; |
| 88 | 88 | } |
@@ -15,6 +15,6 @@ |
||
| 15 | 15 | |
| 16 | 16 | public function registerContainerConfiguration(LoaderInterface $loader) |
| 17 | 17 | { |
| 18 | - $loader->load(__DIR__ . '/config/config.yml'); |
|
| 18 | + $loader->load(__DIR__.'/config/config.yml'); |
|
| 19 | 19 | } |
| 20 | 20 | } |
| 21 | 21 | \ No newline at end of file |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | */ |
| 49 | 49 | public function remove($name) |
| 50 | 50 | { |
| 51 | - foreach ((array) $name as $n) { |
|
| 51 | + foreach ((array)$name as $n) { |
|
| 52 | 52 | unset($this->methods[$n]); |
| 53 | 53 | } |
| 54 | 54 | } |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | public function serialize() |
| 25 | 25 | { |
| 26 | 26 | return serialize([ |
| 27 | - 'id' => $this->id, |
|
| 27 | + 'id' => $this->id, |
|
| 28 | 28 | 'name' => $this->name, |
| 29 | 29 | 'params' => $this->params, |
| 30 | 30 | 'defaults' => $this->defaults, |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | $this->setDefaults($data['defaults']); |
| 42 | 42 | |
| 43 | 43 | if (isset($data['compiled'])) { |
| 44 | - $this->compiled =$data['compiled']; |
|
| 44 | + $this->compiled = $data['compiled']; |
|
| 45 | 45 | } |
| 46 | 46 | } |
| 47 | 47 | |
@@ -147,7 +147,7 @@ |
||
| 147 | 147 | $that = $this; |
| 148 | 148 | |
| 149 | 149 | $cache = $this->getConfigCacheFactory()->cache($this->options['cache_dir'].'/'.$class.'.php', |
| 150 | - function (ConfigCacheInterface $cache) use ($that, $class) { |
|
| 150 | + function(ConfigCacheInterface $cache) use ($that, $class) { |
|
| 151 | 151 | $dumper = $that->getMatcherDumperInstance(); |
| 152 | 152 | |
| 153 | 153 | $options = array( |