Test Failed
Pull Request — master (#5)
by
unknown
04:40
created
src/VodafoneClient.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
         $body = $this->parseResponse($res);
108 108
 
109 109
         if ($body->status === 'ERROR') {
110
-            if($body->code === 201) throw CouldNotReceiveNotification::noNewMessages();
110
+            if ($body->code === 201) throw CouldNotReceiveNotification::noNewMessages();
111 111
             throw StandardNotification::serviceRespondedWithAnError($body);
112 112
         }
113 113
 
@@ -131,6 +131,6 @@  discard block
 block discarded – undo
131 131
      */
132 132
     public function parseResponse($res)
133 133
     {
134
-        return json_decode($res->getBody()->getContents())[0] ?? null;
134
+        return json_decode($res->getBody()->getContents())[ 0 ] ?? null;
135 135
     }
136 136
 }
Please login to merge, or discard this patch.
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -72,7 +72,9 @@  discard block
 block discarded – undo
72 72
             ],
73 73
         ]);
74 74
 
75
-        if (!$res) throw CouldNotSendNotification::serviceUnknownResponse();
75
+        if (!$res) {
76
+            throw CouldNotSendNotification::serviceUnknownResponse();
77
+        }
76 78
 
77 79
         $body = $this->parseResponse($res);
78 80
 
@@ -102,12 +104,16 @@  discard block
 block discarded – undo
102 104
             ],
103 105
         ]);
104 106
 
105
-        if (!$res) throw CouldNotReceiveNotification::serviceUnknownResponse();
107
+        if (!$res) {
108
+            throw CouldNotReceiveNotification::serviceUnknownResponse();
109
+        }
106 110
 
107 111
         $body = $this->parseResponse($res);
108 112
 
109 113
         if ($body->status === 'ERROR') {
110
-            if($body->code === 201) throw CouldNotReceiveNotification::noNewMessages();
114
+            if($body->code === 201) {
115
+                throw CouldNotReceiveNotification::noNewMessages();
116
+            }
111 117
             throw StandardNotification::serviceRespondedWithAnError($body);
112 118
         }
113 119
 
Please login to merge, or discard this patch.