@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | */ |
70 | 70 | public function getLastError(): string |
71 | 71 | { |
72 | - return $this->errors[count($this->errors) - 1]; |
|
72 | + return $this->errors[count($this->errors)-1]; |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | string $url, |
105 | 105 | mixed $data = [], |
106 | 106 | array $headers = [] |
107 | - ): array|bool { |
|
107 | + ): array | bool { |
|
108 | 108 | // preparar datos |
109 | 109 | if ($data && $method != 'GET') { |
110 | 110 | if (isset($data['@files'])) { |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | } |
139 | 139 | // asignar cabecera |
140 | 140 | foreach ($headers as $key => &$value) { |
141 | - $value = $key.': '.$value; |
|
141 | + $value = $key . ': ' . $value; |
|
142 | 142 | } |
143 | 143 | // asignar cabecera |
144 | 144 | curl_setopt($curl, CURLOPT_HTTPHEADER, array_values($headers)); |
@@ -228,10 +228,10 @@ discard block |
||
228 | 228 | * @return array Arreglo con información del estado, incluyendo protocolo, |
229 | 229 | * código y mensaje. |
230 | 230 | */ |
231 | - private function parseResponseStatus(array|string $response_line): array |
|
231 | + private function parseResponseStatus(array | string $response_line): array |
|
232 | 232 | { |
233 | 233 | if (is_array($response_line)) { |
234 | - $response_line = $response_line[count($response_line) - 1]; |
|
234 | + $response_line = $response_line[count($response_line)-1]; |
|
235 | 235 | } |
236 | 236 | $parts = explode(separator: ' ', string: $response_line, limit: 3); |
237 | 237 | return [ |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | * @param array $headers Encabezados adicionales para la solicitud. |
127 | 127 | * @return array Respuesta de la API. |
128 | 128 | */ |
129 | - public function post(string $resource, mixed $data = null, array $headers = []): array|bool |
|
129 | + public function post(string $resource, mixed $data = null, array $headers = []): array | bool |
|
130 | 130 | { |
131 | 131 | $headers = array_merge($this->headers, $headers); |
132 | 132 | return $this->client->query( |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | * @param array $headers Encabezados adicionales para la solicitud. |
149 | 149 | * @return array Respuesta de la API. |
150 | 150 | */ |
151 | - public function get(string $resource, mixed $data = null, array $headers = []): array|bool |
|
151 | + public function get(string $resource, mixed $data = null, array $headers = []): array | bool |
|
152 | 152 | { |
153 | 153 | $headers = array_merge($this->headers, $headers); |
154 | 154 | return $this->client->query( |