Completed
Pull Request — master (#3)
by Pavel
02:49
created
Tests/RpcMockClientTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
         $client = new RpcMockClient();
30 30
         $client->push(
31 31
             $this->creatResponseMock(true, 5),
32
-            function (RpcRequestInterface $request) {
32
+            function(RpcRequestInterface $request) {
33 33
                 return $request->getMethod() === 'entity';
34 34
             }
35 35
         );
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         $client->push($this->creatResponseMock(false, null, $this->createErrorMock(-1, 'invalid')));
45 45
         $client->push(
46 46
             $this->creatResponseMock(true, []),
47
-            function (RpcRequestInterface $request) {
47
+            function(RpcRequestInterface $request) {
48 48
                 return $request->getMethod() === 'entity';
49 49
             }
50 50
         );
Please login to merge, or discard this patch.
Decorators/RequestKeyExtractor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,6 +30,6 @@
 block discarded – undo
30 30
 
31 31
         $stringData = json_encode($data);
32 32
 
33
-        return $this->keyPrefix.sha1($stringData);
33
+        return $this->keyPrefix . sha1($stringData);
34 34
     }
35 35
 }
Please login to merge, or discard this patch.
Tests/DecoratorTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         $cache = $this->prophesize(CacheItemPoolInterface::class);
63 63
         $that  = $this;
64 64
         $cache->getItem(Argument::type('string'))->will(
65
-            function ($args) use (&$items, $that) {
65
+            function($args) use (&$items, $that) {
66 66
                 $key = $args[0];
67 67
                 if (!array_key_exists($key, $items)) {
68 68
                     $item = $that->prophesize(CacheItemInterface::class);
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
                     $item->getKey()->willReturn($key);
71 71
                     $item->isHit()->willReturn(false);
72 72
                     $item->set(Argument::any())->will(
73
-                        function ($args) use ($item) {
73
+                        function($args) use ($item) {
74 74
                             $item->get()->willReturn($args[0]);
75 75
                         }
76 76
                     );
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
             }
86 86
         );
87 87
         $cache->save(Argument::type(CacheItemInterface::class))->will(
88
-            function ($args) use (&$items) {
88
+            function($args) use (&$items) {
89 89
                 $item = $args[0];
90 90
                 $items[$item->getKey()]->isHit()->willReturn(true);
91 91
             }
Please login to merge, or discard this patch.
Tests/AbstractRpcTest.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
         $client = $this->prophesize(RpcClientInterface::class);
66 66
         $that   = $this;
67 67
         $client->invoke(Argument::type('array'))->will(
68
-            function ($args) use ($that, $requests, $responses) {
68
+            function($args) use ($that, $requests, $responses) {
69 69
                 $collection = $that->prophesize(ResponseCollectionInterface::class);
70 70
                 foreach ($requests as $key => $request) {
71 71
                     if (in_array($request, $args[0], true)) {
Please login to merge, or discard this patch.
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -121,6 +121,10 @@
 block discarded – undo
121 121
         return $mock->reveal();
122 122
     }
123 123
 
124
+    /**
125
+     * @param integer $code
126
+     * @param string $message
127
+     */
124 128
     private function createErrorMock($code, $message)
125 129
     {
126 130
         $mock = $this->prophesize(RpcErrorInterface::class);
Please login to merge, or discard this patch.