Remove unauthorized consoleLog helper and restore original quote style
This commit is contained in:
+2
-15
@@ -75,7 +75,7 @@ function executeApiCall($apiEndpoint, $apiKey) {
|
|||||||
$response = curl_exec($ch);
|
$response = curl_exec($ch);
|
||||||
|
|
||||||
if (curl_errno($ch)) {
|
if (curl_errno($ch)) {
|
||||||
throw new CurlErrorException('cURL error: ' . curl_error($ch));
|
throw new CurlErrorException("cURL error: " . curl_error($ch));
|
||||||
}
|
}
|
||||||
|
|
||||||
curl_close($ch);
|
curl_close($ch);
|
||||||
@@ -83,7 +83,7 @@ function executeApiCall($apiEndpoint, $apiKey) {
|
|||||||
$responseData = json_decode($response, true);
|
$responseData = json_decode($response, true);
|
||||||
|
|
||||||
if (json_last_error() !== JSON_ERROR_NONE) {
|
if (json_last_error() !== JSON_ERROR_NONE) {
|
||||||
throw new JsonDataException('Failed to decode JSON response: ' . json_last_error_msg());
|
throw new JsonDataException("Failed to decode JSON response: " . json_last_error_msg());
|
||||||
}
|
}
|
||||||
|
|
||||||
return $responseData;
|
return $responseData;
|
||||||
@@ -249,16 +249,3 @@ function getSign($number) {
|
|||||||
|
|
||||||
return '$';
|
return '$';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Print a variable to the console for debugging purposes.
|
|
||||||
*
|
|
||||||
* @param mixed $data The data to print to the console.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
function consoleLog( $data ) {
|
|
||||||
echo '<script>';
|
|
||||||
echo 'console.log(' . json_encode($data) . ')';
|
|
||||||
echo '</script>';
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user