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

Fixes Fatal Error: Declaration of Symfony\Flex\ParallelDownloader #876

Closed
Closed
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
8 changes: 4 additions & 4 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,15 +121,15 @@ public function setNextOptions(array $options)
/**
* {@inheritdoc}
*/
public function getLastHeaders()
public function getLastHeaders(): array
{
return $this->lastHeaders ?? parent::getLastHeaders();
}

/**
* {@inheritdoc}
*/
public function copy($originUrl, $fileUrl, $fileName, $progress = true, $options = [])
public function copy($originUrl, $fileUrl, $fileName, $progress = true, $options = []): bool
{
$options = array_replace_recursive($this->nextOptions, $options);
$this->nextOptions = [];
Expand All @@ -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