Skip to content

chore: revert #169 #171

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions lib/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,13 +226,13 @@ class Client
* @param bool $verifySSLCerts Set default verify certificates flag
*/
public function __construct(
string $host,
?array $headers = null,
?string $version = null,
?array $path = null,
?array $curlOptions = null,
bool $retryOnLimit = false,
bool $verifySSLCerts = true
$host,
$headers = null,
$version = null,
$path = null,
$curlOptions = null,
$retryOnLimit = false,
$verifySSLCerts = true
) {
$this->host = $host;
$this->headers = $headers ?: [];
Expand Down Expand Up @@ -364,7 +364,7 @@ public function setIsConcurrentRequest($isConcurrent)
*
* @return string
*/
private function buildUrl(?array $queryParams = null)
private function buildUrl($queryParams = null)
{
$path = '/' . implode('/', $this->path);
if (isset($queryParams)) {
Expand All @@ -380,12 +380,12 @@ private function buildUrl(?array $queryParams = null)
* this function does not mutate any private variables.
*
* @param string $method
* @param array $body
* @param $body
* @param array $headers
*
* @return array
*/
private function createCurlOptions($method, ?array $body = null, ?array $headers = null)
private function createCurlOptions($method, $body = null, $headers = null)
{
$options = [
CURLOPT_RETURNTRANSFER => true,
Expand Down Expand Up @@ -508,7 +508,7 @@ private function retryRequest(array $responseHeaders, $method, $url, $body, $hea
*
* @throws InvalidRequest
*/
public function makeRequest($method, $url, ?array $body = null, ?array $headers = null, $retryOnLimit = false)
public function makeRequest($method, $url, $body = null, $headers = null, $retryOnLimit = false)
{
$channel = curl_init($url);

Expand Down Expand Up @@ -604,7 +604,7 @@ public function makeAllRequests(array $requests = [])
*
* @return Client object
*/
public function _(?string $name = null)
public function _($name = null)
{
if (isset($name)) {
$this->path[] = $name;
Expand Down
2 changes: 1 addition & 1 deletion test/unit/MockClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class MockClient extends Client
public $requestHeaders;
public $url;

public function makeRequest($method, $url, ?array $requestBody = null, ?array $requestHeaders = null, $retryOnLimit = false)
public function makeRequest($method, $url, $requestBody = null, $requestHeaders = null, $retryOnLimit = false)
{
$this->requestBody = $requestBody;
$this->requestHeaders = $requestHeaders;
Expand Down
Loading