@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | ); |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | - return (string)$this->last_response->getBody(); |
|
| 153 | + return (string) $this->last_response->getBody(); |
|
| 154 | 154 | } |
| 155 | 155 | |
| 156 | 156 | /** |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | |
| 172 | 172 | if (json_last_error() !== JSON_ERROR_NONE) { |
| 173 | 173 | throw new ApiException( |
| 174 | - 'Error al decodificar JSON: ' . json_last_error_msg() |
|
| 174 | + 'Error al decodificar JSON: '.json_last_error_msg() |
|
| 175 | 175 | ); |
| 176 | 176 | } |
| 177 | 177 | |
@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | } elseif (!empty($body['exception'])) { |
| 224 | 224 | $body = $this->getError()->message; |
| 225 | 225 | } else { |
| 226 | - $body = 'Error no determinado: ' . json_encode($body); |
|
| 226 | + $body = 'Error no determinado: '.json_encode($body); |
|
| 227 | 227 | } |
| 228 | 228 | } |
| 229 | 229 | |
@@ -365,11 +365,11 @@ discard block |
||
| 365 | 365 | } |
| 366 | 366 | $method = $method ?: ($data ? 'POST' : 'GET'); |
| 367 | 367 | $client = new \GuzzleHttp\Client(); |
| 368 | - $this->last_url = $this->api_url . $this->api_prefix . '/'. $this->api_version . $resource; |
|
| 368 | + $this->last_url = $this->api_url.$this->api_prefix.'/'.$this->api_version.$resource; |
|
| 369 | 369 | |
| 370 | 370 | // preparar cabeceras que se usarán |
| 371 | 371 | $options[\GuzzleHttp\RequestOptions::HEADERS] = array_merge([ |
| 372 | - 'Authorization' => 'Bearer ' . $this->api_token, |
|
| 372 | + 'Authorization' => 'Bearer '.$this->api_token, |
|
| 373 | 373 | 'Content-Type' => 'application/json', |
| 374 | 374 | 'Accept' => 'application/json', |
| 375 | 375 | ], $headers); |
@@ -423,10 +423,10 @@ discard block |
||
| 423 | 423 | |
| 424 | 424 | // Se maneja el caso donde no se encuentra un mensaje de error específico |
| 425 | 425 | if (!$message || $message === '') { |
| 426 | - $message = '[API Gateway] Código HTTP ' . $code . ': ' . $reasonPhrase; |
|
| 426 | + $message = '[API Gateway] Código HTTP '.$code.': '.$reasonPhrase; |
|
| 427 | 427 | } |
| 428 | 428 | |
| 429 | - return (object)[ |
|
| 429 | + return (object) [ |
|
| 430 | 430 | 'code' => $code, |
| 431 | 431 | 'message' => $message, |
| 432 | 432 | ]; |