Skip to content
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

Add some native return types #874

Merged
merged 1 commit into from
Apr 30, 2022
Merged
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
6 changes: 3 additions & 3 deletions src/ParallelDownloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function download(array &$nextArgs, callable $nextCallback, bool $quiet =
}
}

public function getOptions()
public function getOptions(): array
{
$options = array_replace_recursive(parent::getOptions(), $this->nextOptions);
$this->nextOptions = [];
Expand All @@ -121,7 +121,7 @@ public function setNextOptions(array $options)
/**
* {@inheritdoc}
*/
public function getLastHeaders()
public function getLastHeaders(): array
{
return $this->lastHeaders ?? parent::getLastHeaders();
}
Expand Down Expand Up @@ -156,7 +156,7 @@ public function getContents($originUrl, $fileUrl, $progress = true, $options = [
/**
* @internal
*/
public function callbackGet($notificationCode, $severity, $message, $messageCode, $bytesTransferred, $bytesMax, $nativeDownload = true)
public function callbackGet($notificationCode, $severity, $message, $messageCode, $bytesTransferred, $bytesMax, $nativeDownload = true): void
{
if (!$nativeDownload && \STREAM_NOTIFY_SEVERITY_ERR === $severity) {
throw new TransportException($message, $messageCode);
Expand Down