From e52071a92c7f5c34c373ab880e1d0b37cc435c42 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Tue, 22 Feb 2022 20:20:18 +0100 Subject: [PATCH] Revert some return types for symfony/flex compatibility --- src/Composer/Util/RemoteFilesystem.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Composer/Util/RemoteFilesystem.php b/src/Composer/Util/RemoteFilesystem.php index 2d4865b079fc..4d666fc30e34 100644 --- a/src/Composer/Util/RemoteFilesystem.php +++ b/src/Composer/Util/RemoteFilesystem.php @@ -106,7 +106,7 @@ public function __construct(IOInterface $io, Config $config, array $options = ar * * @return bool true */ - public function copy(string $originUrl, string $fileUrl, string $fileName, bool $progress = true, array $options = array()): bool + public function copy(string $originUrl, string $fileUrl, string $fileName, bool $progress = true, array $options = array()) { return $this->get($originUrl, $fileUrl, $options, $fileName, $progress); } @@ -131,7 +131,7 @@ public function getContents(string $originUrl, string $fileUrl, bool $progress = * * @return mixed[] Options */ - public function getOptions(): array + public function getOptions() { return $this->options; } @@ -142,7 +142,7 @@ public function getOptions(): array * @param mixed[] $options * @return void */ - public function setOptions(array $options): void + public function setOptions(array $options) { $this->options = array_replace_recursive($this->options, $options); } @@ -152,7 +152,7 @@ public function setOptions(array $options): void * * @return bool */ - public function isTlsDisabled(): bool + public function isTlsDisabled() { return $this->disableTls === true; } @@ -162,7 +162,7 @@ public function isTlsDisabled(): bool * * @return string[] */ - public function getLastHeaders(): array + public function getLastHeaders() { return $this->lastHeaders; } @@ -171,7 +171,7 @@ public function getLastHeaders(): array * @param string[] $headers array of returned headers like from getLastHeaders() * @return int|null */ - public static function findStatusCode(array $headers): ?int + public static function findStatusCode(array $headers) { $value = null; foreach ($headers as $header) { @@ -189,7 +189,7 @@ public static function findStatusCode(array $headers): ?int * @param string[] $headers array of returned headers like from getLastHeaders() * @return string|null */ - public function findStatusMessage(array $headers): ?string + public function findStatusMessage(array $headers) { $value = null; foreach ($headers as $header) { @@ -554,7 +554,7 @@ protected function getRemoteContents(string $originUrl, string $fileUrl, $contex * * @throws TransportException */ - protected function callbackGet(int $notificationCode, int $severity, ?string $message, int $messageCode, int $bytesTransferred, int $bytesMax): void + protected function callbackGet(int $notificationCode, int $severity, ?string $message, int $messageCode, int $bytesTransferred, int $bytesMax) { switch ($notificationCode) { case STREAM_NOTIFY_FAILURE: @@ -592,7 +592,7 @@ protected function callbackGet(int $notificationCode, int $severity, ?string $me * * @return void */ - protected function promptAuthAndRetry($httpStatus, ?string $reason = null, array $headers = array()): void + protected function promptAuthAndRetry($httpStatus, ?string $reason = null, array $headers = array()) { $result = $this->authHelper->promptAuthIfNeeded($this->fileUrl, $this->originUrl, $httpStatus, $reason, $headers); @@ -610,7 +610,7 @@ protected function promptAuthAndRetry($httpStatus, ?string $reason = null, array * * @return mixed[] */ - protected function getOptionsForUrl(string $originUrl, array $additionalOptions): array + protected function getOptionsForUrl(string $originUrl, array $additionalOptions) { $tlsOptions = array(); $headers = array();