Skip to content

Commit

Permalink
Change code style to PSR-12 in HttpClient.php
Browse files Browse the repository at this point in the history
  • Loading branch information
asrorbekh committed Jan 13, 2024
1 parent c2f6828 commit 5a86c11
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Http/HttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ class HttpClient
/**
* HttpClient constructor.
*
* @param string|null $publicKey CloudPayments public key.
* @param string|null $apiSecret CloudPayments API secret key.
* @param string|null $apiUrl CloudPayments API base URL.
* @param bool|null $enableSSL Flag indicating whether SSL verification is enabled.
* @param string|null $publicKey CloudPayments public key.
* @param string|null $apiSecret CloudPayments API secret key.
* @param string|null $apiUrl CloudPayments API base URL.
* @param bool|null $enableSSL Flag indicating whether SSL verification is enabled.
*/
public function __construct(
private readonly string|null $publicKey = null,
private readonly string|null $apiSecret = null,
private readonly string|null $apiUrl = null,
private readonly bool|null $enableSSL = true,
private readonly bool|null $enableSSL = true,
) {
$this->curl = new Curl();
}
Expand All @@ -49,7 +49,7 @@ public function sendRequest(?string $url = null, array|object|null $data = null,
$responseObject->status = false;
$responseObject->data = null;

if(!$data) {
if (!$data) {
$responseObject->message = 'Invalid data params.';
$responseObject->code = 400;
return $responseObject;
Expand Down Expand Up @@ -82,7 +82,7 @@ public function sendRequest(?string $url = null, array|object|null $data = null,
$responseObject->code = $this->curl->getHttpStatusCode();
$responseObject->data = $response;

if($this->curl->error) {
if ($this->curl->error) {
$responseObject->message = $this->curl->getCurlErrorMessage();
$responseObject->code = $this->curl->getCurlErrorCode();
} else {
Expand Down

0 comments on commit 5a86c11

Please sign in to comment.