Completed
Push — master ( 137a25...07f458 )
by Daniel
04:36
created
Rpc/BaseService.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
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();
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
Routing/Loader/YamlRpcLoader.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -34,6 +34,9 @@
 block discarded – undo
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) {
Please login to merge, or discard this patch.
Tests/Routing/Loader/YamlRpcLoaderTest.php 2 patches
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -61,6 +61,10 @@
 block discarded – undo
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');
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
                 }
Please login to merge, or discard this patch.
Rpc/RpcClient.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@
 block discarded – undo
164 164
     }
165 165
 
166 166
     /**
167
-     * @param $body
167
+     * @param string $body
168 168
      */
169 169
     private function handleRequest($body)
170 170
     {
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,6 @@
 block discarded – undo
8 8
 use Cmobi\RabbitmqBundle\Rpc\Request\RpcRequest;
9 9
 use Cmobi\RabbitmqBundle\Rpc\Request\RpcRequestCollection;
10 10
 use Cmobi\RabbitmqBundle\Rpc\Request\RpcRequestCollectionInterface;
11
-use Cmobi\RabbitmqBundle\Rpc\Request\RpcRequestInterface;
12 11
 use Cmobi\RabbitmqBundle\Rpc\Response\RpcResponse;
13 12
 use Cmobi\RabbitmqBundle\Rpc\Response\RpcResponseCollection;
14 13
 use PhpAmqpLib\Channel\AbstractChannel;
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
      */
43 43
     public function onResponse(AMQPMessage $rep)
44 44
     {
45
-        if($rep->get('correlation_id') == $this->correlationId) {
45
+        if ($rep->get('correlation_id') == $this->correlationId) {
46 46
             $this->response = $rep->body;
47 47
         }
48 48
     }
@@ -192,8 +192,8 @@  discard block
 block discarded – undo
192 192
         $expire = self::DEFAULT_TTL
193 193
     )
194 194
     {
195
-        list($callbackQueue, ,) = $this->getChannel()->queue_declare(
196
-            'callback_to_' . $this->getQueueName() . uniqid('', true), false, false, false, true, false, [
195
+        list($callbackQueue,,) = $this->getChannel()->queue_declare(
196
+            'callback_to_'.$this->getQueueName().uniqid('', true), false, false, false, true, false, [
197 197
                 'x-message-ttl' => ['I', $expire],
198 198
                 'x-max-priority' => ['I', RpcRequestCollectionInterface::PRIORITY_MAX]
199 199
             ]
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
         );
215 215
         $this->getChannel()->basic_publish($msg, '', $this->getQueueName());
216 216
 
217
-        while(!$this->response) {
217
+        while (!$this->response) {
218 218
             $this->getChannel()->wait();
219 219
         }
220 220
         $this->getChannel()->close();
Please login to merge, or discard this patch.
Rpc/Exception/RpcInvalidRequestException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
 {
8 8
     const ERROR_CODE = -32600;
9 9
 
10
-    public function __construct($message = null,\Exception $previous = null)
10
+    public function __construct($message = null, \Exception $previous = null)
11 11
     {
12 12
         if (is_null($message)) {
13 13
             $message = 'Invalid Request';
Please login to merge, or discard this patch.