Skip to content
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
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"phpstan/phpstan-strict-rules": "^2.0",
"phpstan/extension-installer": "^1.4",
"phpunit/phpunit" : "^11.5",
"rector/rector": "^2.5"
"rector/rector": "^2.6"
},
"suggest" : {
"ext-curl" : " to make http requests with the Client class"
Expand Down
4 changes: 1 addition & 3 deletions lib/Auth/AWS.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,7 @@ public function validate(string $secretKey): bool

$requestDate = $this->request->getHeader('x-amz-date');

if (null === $requestDate) {
$requestDate = $this->request->getHeader('Date');
}
$requestDate ??= $this->request->getHeader('Date');

if (!$this->validateRFC2616Date((string) $requestDate)) {
return false;
Expand Down
4 changes: 1 addition & 3 deletions lib/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -584,9 +584,7 @@ protected function parseCurlResult(string $response, $curlHandle): array
*/
protected function sendAsyncInternal(RequestInterface $request, callable $success, callable $error, int $retryCount = 0): void
{
if (null === $this->curlMultiHandle) {
$this->curlMultiHandle = curl_multi_init();
}
$this->curlMultiHandle ??= curl_multi_init();
$curl = curl_init();
curl_setopt_array(
$curl,
Expand Down
4 changes: 1 addition & 3 deletions tests/HTTP/SapiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,7 @@ public function testSendContentRangeStream(
$ignoreAtStartLength = strlen($ignoreAtStart);
$ignoreAtEndLength = strlen($ignoreAtEnd);
$body = fopen('php://memory', 'w');
if (null === $contentLength) {
$contentLength = strlen($partial);
}
$contentLength ??= strlen($partial);
fwrite($body, $ignoreAtStart);
fwrite($body, $partial);
if ($ignoreAtEndLength > 0) {
Expand Down