Skip to content
Open
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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
vendor
composer.lock
humbuglog.txt
humbuglog.txt

.idea
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"require": {
"php": ">=7.3",
"guzzlehttp/psr7": "^2.1",
"psr/log": "^1.0 || ^2.0 || ^3.0"
"psr/log": "^1.0 || ^2.0 || ^3.0",
"ext-curl": "*"
},
"require-dev": {
"phpunit/phpunit": "^9.5",
Expand Down
2 changes: 1 addition & 1 deletion src/Debugger/Logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function __construct(LoggerInterface $logger)
* @param Call $call
* @param CallInfo | null $info
*/
public function debugCall(Call $call, CallInfo $info = null)
public function debugCall(Call $call, ?CallInfo $info = null)
{
$message = $call->hasException()
? 'Thrown exception: ' . $call->getException()->getMessage()
Expand Down
1 change: 0 additions & 1 deletion src/Handler/CurlMultiRequestHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ public function sendMany(CallRegistry $callRegistry)
$this->getLogger()->debugCall($call, $info);

curl_multi_remove_handle($multiHandle, $handle);
curl_close($handle);
}
curl_multi_close($multiHandle);
}
Expand Down
3 changes: 0 additions & 3 deletions src/Handler/CurlRequestHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ public function send(Call $call)
}

$info = CurlCallInfoFactory::createFromInfo(curl_getinfo($curlHandle));
curl_close($curlHandle);

$this->getLogger()->debugCall($call, $info);
}
Expand Down Expand Up @@ -110,8 +109,6 @@ public function sendMany(CallRegistry $callRegistry)
$info = CurlCallInfoFactory::createFromInfo(curl_getinfo($curlHandle));
$this->getLogger()->debugCall($call, $info);
}

curl_close($curlHandle);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Operation/CommandOperation.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ public function set($key, $value)


/**
* @param UrlQuery $urlQuery
* @param UrlQuery|null $urlQuery
* @param array $extra
* @return string
*/
protected function buildUrlQuery(UrlQuery $urlQuery = null, array $extra = [])
protected function buildUrlQuery(?UrlQuery $urlQuery = null, array $extra = [])
{
$params = [];
if (null !== $urlQuery) {
Expand Down
2 changes: 1 addition & 1 deletion src/Operation/SuccessfulOperationResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class SuccessfulOperationResponse implements OperationResponse
* @param int $successCode
* @param RequestInterface $request
*/
public function __construct(ResponseInterface $response, $successCode, RequestInterface $request = null)
public function __construct(ResponseInterface $response, $successCode, ?RequestInterface $request = null)
{
$this->response = $response;
$this->successCode = (int) $successCode;
Expand Down