Completed
Push — master ( 981511...5f2ce9 )
by Raphaël
02:19
created
src/Response/CertainResponse.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,9 +61,9 @@
 block discarded – undo
61 61
             $bodyString = $streamBody->getContents();
62 62
 
63 63
             if($contentType === 'json'){
64
-               $response['results'] = $this->jsonp_decode($bodyString, $assoc);
64
+                $response['results'] = $this->jsonp_decode($bodyString, $assoc);
65 65
             }else{
66
-               $response['results']=$bodyString;
66
+                $response['results']=$bodyString;
67 67
             }
68 68
 
69 69
             $response['success'] = true;
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -48,22 +48,22 @@
 block discarded – undo
48 48
      * @param boolean $assoc
49 49
      * @return array
50 50
      */
51
-    public function getResponse($contentType='json',$assoc = false)
51
+    public function getResponse($contentType = 'json', $assoc = false)
52 52
     {
53 53
         $response = array(
54
-            'statusCode' => $this->response?$this->response->getStatusCode():null,
54
+            'statusCode' => $this->response ? $this->response->getStatusCode() : null,
55 55
             'success' => false,
56 56
             'results' => null,
57
-            'message' => $this->response?$this->response->getReasonPhrase():null
57
+            'message' => $this->response ? $this->response->getReasonPhrase() : null
58 58
         );
59 59
         if ($this->response && in_array($this->response->getStatusCode(), array(200, 201))) {
60 60
             $streamBody = $this->response->getBody();
61 61
             $bodyString = $streamBody->getContents();
62 62
 
63
-            if($contentType === 'json'){
63
+            if ($contentType === 'json') {
64 64
                $response['results'] = $this->jsonp_decode($bodyString, $assoc);
65
-            }else{
66
-               $response['results']=$bodyString;
65
+            }else {
66
+               $response['results'] = $bodyString;
67 67
             }
68 68
 
69 69
             $response['success'] = true;
Please login to merge, or discard this patch.