From dd031a170256bf6ec323212564ed4a7c91a39b8b Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Sun, 6 Sep 2015 12:28:08 +0100 Subject: [PATCH] PHPDoc fixes --- phpseclib/Crypt/Random.php | 2 +- phpseclib/File/X509.php | 8 ++++---- phpseclib/Math/BigInteger.php | 8 ++++---- phpseclib/Net/SSH1.php | 2 +- phpseclib/Net/SSH2.php | 28 ++++++++++++++-------------- 5 files changed, 24 insertions(+), 24 deletions(-) diff --git a/phpseclib/Crypt/Random.php b/phpseclib/Crypt/Random.php index af3896d7..4ff913ab 100644 --- a/phpseclib/Crypt/Random.php +++ b/phpseclib/Crypt/Random.php @@ -268,7 +268,7 @@ if (!function_exists('phpseclib_resolve_include_path')) { * PHP 5.3.2) with fallback implementation for earlier PHP versions. * * @param string $filename - * @return mixed Filename (string) on success, false otherwise. + * @return string|false * @access public */ function phpseclib_resolve_include_path($filename) diff --git a/phpseclib/File/X509.php b/phpseclib/File/X509.php index 937c3799..cee91d0d 100644 --- a/phpseclib/File/X509.php +++ b/phpseclib/File/X509.php @@ -3758,7 +3758,7 @@ class File_X509 * @param string $path absolute path with / as component separator * @param bool $create optional * @access private - * @return array item ref or false + * @return mixed */ function &_subArray(&$root, $path, $create = false) { @@ -3794,7 +3794,7 @@ class File_X509 * @param string $path optional absolute path with / as component separator * @param bool $create optional * @access private - * @return array ref or false + * @return mixed */ function &_extensions(&$root, $path = null, $create = false) { @@ -4381,7 +4381,7 @@ class File_X509 * @param string $serial * @param bool $create optional * @access private - * @return int or false + * @return int|false */ function _revokedCertificate(&$rclist, $serial, $create = false) { @@ -4631,7 +4631,7 @@ class File_X509 * getOID('zzz') == 'zzz' * * @access public - * @return String + * @return string */ function getOID($name) { diff --git a/phpseclib/Math/BigInteger.php b/phpseclib/Math/BigInteger.php index 1ec6d5e9..612e65b9 100644 --- a/phpseclib/Math/BigInteger.php +++ b/phpseclib/Math/BigInteger.php @@ -2430,7 +2430,7 @@ class Math_BigInteger * * * @param Math_BigInteger $n - * @return mixed false, if no modular inverse exists, Math_BigInteger, otherwise. + * @return Math_BigInteger|false * @access public * @internal See {@link http://www.cacr.math.uwaterloo.ca/hac/about/chap14.pdf#page=21 HAC 14.64} for more information. */ @@ -3190,13 +3190,13 @@ class Math_BigInteger /** * Generate a random prime number. * - * If there's not a prime within the given range, false will be returned. If more than $timeout seconds have elapsed, - * give up and return false. + * If there's not a prime within the given range, false will be returned. + * If more than $timeout seconds have elapsed, give up and return false. * * @param Math_BigInteger $arg1 * @param Math_BigInteger $arg2 * @param int $timeout - * @return mixed + * @return Math_BigInteger|false * @access public * @internal See {@link http://www.cacr.math.uwaterloo.ca/hac/about/chap4.pdf#page=15 HAC 4.44}. */ diff --git a/phpseclib/Net/SSH1.php b/phpseclib/Net/SSH1.php index 2d1427af..21c305a6 100644 --- a/phpseclib/Net/SSH1.php +++ b/phpseclib/Net/SSH1.php @@ -1414,7 +1414,7 @@ class Net_SSH1 * Returns a string if NET_SSH1_LOGGING == NET_SSH1_LOG_COMPLEX, an array if NET_SSH1_LOGGING == NET_SSH1_LOG_SIMPLE and false if !defined('NET_SSH1_LOGGING') * * @access public - * @return string or Array + * @return array|false|string */ function getLog() { diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index 5543e081..07d7d452 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -192,7 +192,7 @@ class Net_SSH2 * Server Identifier * * @see Net_SSH2::getServerIdentification() - * @var mixed false or Array + * @var array|false * @access private */ var $server_identifier = false; @@ -201,7 +201,7 @@ class Net_SSH2 * Key Exchange Algorithms * * @see Net_SSH2::getKexAlgorithims() - * @var mixed false or Array + * @var array|false * @access private */ var $kex_algorithms = false; @@ -237,7 +237,7 @@ class Net_SSH2 * Server Host Key Algorithms * * @see Net_SSH2::getServerHostKeyAlgorithms() - * @var mixed false or Array + * @var array|false * @access private */ var $server_host_key_algorithms = false; @@ -246,7 +246,7 @@ class Net_SSH2 * Encryption Algorithms: Client to Server * * @see Net_SSH2::getEncryptionAlgorithmsClient2Server() - * @var mixed false or Array + * @var array|false * @access private */ var $encryption_algorithms_client_to_server = false; @@ -255,7 +255,7 @@ class Net_SSH2 * Encryption Algorithms: Server to Client * * @see Net_SSH2::getEncryptionAlgorithmsServer2Client() - * @var mixed false or Array + * @var array|false * @access private */ var $encryption_algorithms_server_to_client = false; @@ -264,7 +264,7 @@ class Net_SSH2 * MAC Algorithms: Client to Server * * @see Net_SSH2::getMACAlgorithmsClient2Server() - * @var mixed false or Array + * @var array|false * @access private */ var $mac_algorithms_client_to_server = false; @@ -273,7 +273,7 @@ class Net_SSH2 * MAC Algorithms: Server to Client * * @see Net_SSH2::getMACAlgorithmsServer2Client() - * @var mixed false or Array + * @var array|false * @access private */ var $mac_algorithms_server_to_client = false; @@ -282,7 +282,7 @@ class Net_SSH2 * Compression Algorithms: Client to Server * * @see Net_SSH2::getCompressionAlgorithmsClient2Server() - * @var mixed false or Array + * @var array|false * @access private */ var $compression_algorithms_client_to_server = false; @@ -291,7 +291,7 @@ class Net_SSH2 * Compression Algorithms: Server to Client * * @see Net_SSH2::getCompressionAlgorithmsServer2Client() - * @var mixed false or Array + * @var array|false * @access private */ var $compression_algorithms_server_to_client = false; @@ -300,7 +300,7 @@ class Net_SSH2 * Languages: Server to Client * * @see Net_SSH2::getLanguagesServer2Client() - * @var mixed false or Array + * @var array|false * @access private */ var $languages_server_to_client = false; @@ -309,7 +309,7 @@ class Net_SSH2 * Languages: Client to Server * * @see Net_SSH2::getLanguagesClient2Server() - * @var mixed false or Array + * @var array|false * @access private */ var $languages_client_to_server = false; @@ -1898,7 +1898,7 @@ class Net_SSH2 * Maps an encryption algorithm name to the number of key bytes. * * @param string $algorithm Name of the encryption algorithm - * @return mixed Number of bytes as an integer or null for unknown + * @return int|null Number of bytes as an integer or null for unknown * @access private */ function _encryption_algorithm_to_key_size($algorithm) @@ -3758,7 +3758,7 @@ class Net_SSH2 * Returns a string if NET_SSH2_LOGGING == NET_SSH2_LOG_COMPLEX, an array if NET_SSH2_LOGGING == NET_SSH2_LOG_SIMPLE and false if !defined('NET_SSH2_LOGGING') * * @access public - * @return string or Array + * @return array|false|string */ function getLog() { @@ -4191,7 +4191,7 @@ class Net_SSH2 /** * Returns the exit status of an SSH command or false. * - * @return int or false + * @return false|int * @access public */ function getExitStatus()