Completed
Push — master ( 6647db...0cc2fc )
by thomas
7s
created
src/Request/RequestFactory.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
     /**
10 10
      * @var array
11 11
      */
12
-    private $nonces = [];
12
+    private $nonces = [ ];
13 13
 
14 14
     /**
15 15
      * @param string $method
@@ -35,14 +35,14 @@  discard block
 block discarded – undo
35 35
         $decoded = json_decode(trim($string), true);
36 36
 
37 37
         if (json_last_error() === JSON_ERROR_NONE) {
38
-            $id = isset($decoded['id']) ? $decoded['id'] : null;
39
-
40
-            if (isset($decoded['error'])) {
41
-                return new ApiError($id, $decoded['error']);
42
-            } elseif (isset($decoded['method']) && isset($decoded['params'])) {
43
-                return new Request($id, $decoded['method'], $decoded['params']);
44
-            } elseif (isset($decoded['result'])) {
45
-                return new Response($id, $decoded['result']);
38
+            $id = isset($decoded[ 'id' ]) ? $decoded[ 'id' ] : null;
39
+
40
+            if (isset($decoded[ 'error' ])) {
41
+                return new ApiError($id, $decoded[ 'error' ]);
42
+            } elseif (isset($decoded[ 'method' ]) && isset($decoded[ 'params' ])) {
43
+                return new Request($id, $decoded[ 'method' ], $decoded[ 'params' ]);
44
+            } elseif (isset($decoded[ 'result' ])) {
45
+                return new Response($id, $decoded[ 'result' ]);
46 46
             }
47 47
 
48 48
             throw new \Exception('Response missing error/params/result');
Please login to merge, or discard this patch.