@@ -19,7 +19,7 @@ |
||
| 19 | 19 | /** |
| 20 | 20 | * @var JsonRpcResponseCollection $responses |
| 21 | 21 | */ |
| 22 | - // $responses = $this->getMockBuilder('Cmobi\RabbitmqBundle\Rpc\Response\JsonRpcResponseCollection')->getMock(); |
|
| 22 | + // $responses = $this->getMockBuilder('Cmobi\RabbitmqBundle\Rpc\Response\JsonRpcResponseCollection')->getMock(); |
|
| 23 | 23 | /** |
| 24 | 24 | * @var AMQPMessage |
| 25 | 25 | */ |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | */ |
| 42 | 42 | public function createCallback() |
| 43 | 43 | { |
| 44 | - $callback = function (AMQPMessage $message) { |
|
| 44 | + $callback = function(AMQPMessage $message) { |
|
| 45 | 45 | |
| 46 | 46 | $responseCollection = $this->rpcMessager->getResponseCollection(); |
| 47 | 47 | $requestCollection = $this->rpcMessager->getRequestCollection(); |
@@ -93,7 +93,7 @@ |
||
| 93 | 93 | |
| 94 | 94 | /** |
| 95 | 95 | * @param AMQPMessage $message |
| 96 | - * @param $content |
|
| 96 | + * @param AMQPMessage $content |
|
| 97 | 97 | */ |
| 98 | 98 | public function publish(AMQPMessage $message, $content) |
| 99 | 99 | { |
@@ -34,6 +34,9 @@ |
||
| 34 | 34 | throw new ResourceNotFoundException(sprintf('No routes found for "%s".', $path)); |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | + /** |
|
| 38 | + * @param string $path |
|
| 39 | + */ |
|
| 37 | 40 | public function matchCollection($path, MethodCollection $methods) |
| 38 | 41 | { |
| 39 | 42 | foreach ($methods as $name => $method) { |
@@ -61,6 +61,10 @@ |
||
| 61 | 61 | return new ControllerNameParser($kernel); |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | + /** |
|
| 65 | + * @param string $namespace |
|
| 66 | + * @param string $name |
|
| 67 | + */ |
|
| 64 | 68 | private function getBundle($namespace, $name) |
| 65 | 69 | { |
| 66 | 70 | $bundle = $this->getMock('Symfony\Component\HttpKernel\Bundle\BundleInterface'); |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | public function testLoadRouteInstance() |
| 13 | 13 | { |
| 14 | 14 | $parser = $this->createParser(); |
| 15 | - $path = __DIR__ . '/../../app/config'; |
|
| 15 | + $path = __DIR__.'/../../app/config'; |
|
| 16 | 16 | $loader = new YamlRpcLoader($this->getContainer(), $path, $parser); |
| 17 | 17 | $methodCollection = $loader->load('rpc_routing.yml'); |
| 18 | 18 | $method = $methodCollection->get('cmobi_rabbitmq'); |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | public function testLoadRouteName() |
| 24 | 24 | { |
| 25 | 25 | $parser = $this->createParser(); |
| 26 | - $path = __DIR__ . '/../../app/config'; |
|
| 26 | + $path = __DIR__.'/../../app/config'; |
|
| 27 | 27 | $loader = new YamlRpcLoader($this->getContainer(), $path, $parser); |
| 28 | 28 | $methodCollection = $loader->load('rpc_routing.yml'); |
| 29 | 29 | $method = $methodCollection->get('cmobi_rabbitmq'); |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | $kernel |
| 42 | 42 | ->expects($this->any()) |
| 43 | 43 | ->method('getBundle') |
| 44 | - ->will($this->returnCallback(function ($bundle) use ($bundles) { |
|
| 44 | + ->will($this->returnCallback(function($bundle) use ($bundles) { |
|
| 45 | 45 | if (!isset($bundles[$bundle])) { |
| 46 | 46 | throw new \InvalidArgumentException(sprintf('Invalid bundle name "%s"', $bundle)); |
| 47 | 47 | } |