@@ -61,9 +61,9 @@ |
||
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; |
@@ -48,22 +48,22 @@ |
||
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; |