@@ -206,10 +206,10 @@ public function setRouter(string $router): void
206206 * This function performs an HTTP GET request to the built-in server.
207207 *
208208 * @param string $query The query to perform.
209- * @param array $parameters An array (can be empty) with parameters for the requested URI.
210- * @param array $curlopts An array (can be empty) with options for cURL.
209+ * @param array<mixed> $parameters An array (can be empty) with parameters for the requested URI.
210+ * @param array<mixed> $curlopts An array (can be empty) with options for cURL.
211211 *
212- * @return array The response obtained from the built-in server.
212+ * @return array<mixed> The response obtained from the built-in server.
213213 */
214214 public function get (string $ query , array $ parameters , array $ curlopts = []): array
215215 {
@@ -218,12 +218,12 @@ public function get(string $query, array $parameters, array $curlopts = []): arr
218218 $ url .= (!empty ($ parameters )) ? '? ' . http_build_query ($ parameters ) : '' ;
219219 curl_setopt_array ($ ch , [
220220 CURLOPT_URL => $ url ,
221- CURLOPT_RETURNTRANSFER => 1 ,
222- CURLOPT_HEADER => 1 ,
221+ CURLOPT_RETURNTRANSFER => true ,
222+ CURLOPT_HEADER => true ,
223223 ]);
224224 curl_setopt_array ($ ch , $ curlopts );
225225
226- /** @var mixed $resp */
226+ /** @var string|bool $resp */
227227 $ resp = curl_exec ($ ch );
228228 $ code = curl_getinfo ($ ch , CURLINFO_HTTP_CODE );
229229 list ($ header , $ body ) = explode ("\r\n\r\n" , $ resp , 2 );
0 commit comments