From 906a5fafabe5e6ba51ef3dc65b2722a677908837 Mon Sep 17 00:00:00 2001 From: Ernest Lebedev Date: Thu, 4 Mar 2021 17:48:59 +0300 Subject: [PATCH] Added some PHPDoc fixes according to use cases from the docs (https://phpseclib.com/docs/sftp) to satisfy PHPStan --- phpseclib/Net/SFTP.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/phpseclib/Net/SFTP.php b/phpseclib/Net/SFTP.php index f44c7a3a..e65b3c86 100644 --- a/phpseclib/Net/SFTP.php +++ b/phpseclib/Net/SFTP.php @@ -37,9 +37,10 @@ namespace phpseclib3\Net; -use ParagonIE\ConstantTime\Hex; use phpseclib3\Exception\FileNotFoundException; use phpseclib3\Common\Functions\Strings; +use phpseclib3\Crypt\Common\AsymmetricKey; +use phpseclib3\System\SSH\Agent; /** * Pure-PHP implementations of SFTP. @@ -430,7 +431,7 @@ class SFTP extends SSH2 * Login * * @param string $username - * @param string[] ...$args + * @param string|AsymmetricKey|array[]|Agent|null ...$args * @throws \UnexpectedValueException on receipt of unexpected packets * @return bool * @access public @@ -2096,7 +2097,7 @@ class SFTP extends SSH2 * $offset and $length can be used to download files in chunks. * * @param string $remote_file - * @param string|bool|resource $local_file + * @param string|bool|resource|callable $local_file * @param int $offset * @param int $length * @param callable|null $progressCallback