From 2be0506514a46df3053eea4b5d8b1210dd059233 Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Wed, 2 Sep 2015 00:44:39 +0100 Subject: [PATCH] Fixed invalid param phpdoc --- phpseclib/Crypt/Base.php | 8 +++---- phpseclib/Crypt/Hash.php | 6 ++--- phpseclib/Crypt/RSA.php | 8 +++---- phpseclib/Crypt/Rijndael.php | 2 +- phpseclib/Crypt/TripleDES.php | 2 +- phpseclib/File/ASN1.php | 6 ++--- phpseclib/Math/BigInteger.php | 12 +++++----- phpseclib/Net/SCP.php | 10 ++++----- phpseclib/Net/SFTP.php | 42 +++++++++++++++++------------------ phpseclib/Net/SFTP/Stream.php | 2 +- phpseclib/Net/SSH1.php | 22 +++++++++--------- phpseclib/Net/SSH2.php | 12 +++++----- 12 files changed, 66 insertions(+), 66 deletions(-) diff --git a/phpseclib/Crypt/Base.php b/phpseclib/Crypt/Base.php index 7096b662..5a43d7aa 100644 --- a/phpseclib/Crypt/Base.php +++ b/phpseclib/Crypt/Base.php @@ -461,7 +461,7 @@ abstract class Base * * If not explicitly set, self::MODE_CBC will be used. * - * @param optional Integer $mode + * @param Integer $mode * @access public */ function __construct($mode = self::MODE_CBC) @@ -544,7 +544,7 @@ abstract class Base * * @see Crypt/Hash.php * @param String $password - * @param optional String $method + * @param String $method * @throws \LengthException if pbkdf1 is being used and the derived key length exceeds the hash length * @return Boolean * @access public @@ -1841,7 +1841,7 @@ abstract class Base * Inspired by array_shift * * @param String $string - * @param optional Integer $index + * @param Integer $index * @access private * @return String */ @@ -1858,7 +1858,7 @@ abstract class Base * Inspired by array_pop * * @param String $string - * @param optional Integer $index + * @param Integer $index * @access private * @return String */ diff --git a/phpseclib/Crypt/Hash.php b/phpseclib/Crypt/Hash.php index 14b8a32a..38750e9b 100644 --- a/phpseclib/Crypt/Hash.php +++ b/phpseclib/Crypt/Hash.php @@ -133,7 +133,7 @@ class Hash /** * Default Constructor. * - * @param optional String $hash + * @param String $hash * @return \phpseclib\Crypt\Hash * @access public */ @@ -161,7 +161,7 @@ class Hash * Keys can be of any length. * * @access public - * @param optional String $key + * @param String $key */ function setKey($key = false) { @@ -812,7 +812,7 @@ class Hash * Inspired by array_shift * * @param String $string - * @param optional Integer $index + * @param Integer $index * @return String * @access private */ diff --git a/phpseclib/Crypt/RSA.php b/phpseclib/Crypt/RSA.php index 9edb9f61..ab44d171 100644 --- a/phpseclib/Crypt/RSA.php +++ b/phpseclib/Crypt/RSA.php @@ -537,9 +537,9 @@ class RSA * Will need to be passed back to \phpseclib\Crypt\RSA::createKey() as the third parameter for further processing. * * @access public - * @param optional Integer $bits - * @param optional Integer $timeout - * @param optional array $p + * @param Integer $bits + * @param Integer $timeout + * @param array $p */ function createKey($bits = 1024, $timeout = false, $partial = array()) { @@ -1942,7 +1942,7 @@ class RSA * Inspired by array_shift * * @param String $string - * @param optional Integer $index + * @param Integer $index * @return String * @access private */ diff --git a/phpseclib/Crypt/Rijndael.php b/phpseclib/Crypt/Rijndael.php index 90c75d83..10c9c891 100644 --- a/phpseclib/Crypt/Rijndael.php +++ b/phpseclib/Crypt/Rijndael.php @@ -209,7 +209,7 @@ class Rijndael extends Base * If not explictly set, \phpseclib\Crypt\Base::MODE_CBC will be used. * * @see \phpseclib\Crypt\Base::Crypt_Base() - * @param optional Integer $mode + * @param Integer $mode * @access public /** diff --git a/phpseclib/Crypt/TripleDES.php b/phpseclib/Crypt/TripleDES.php index d4caa398..84921319 100644 --- a/phpseclib/Crypt/TripleDES.php +++ b/phpseclib/Crypt/TripleDES.php @@ -154,7 +154,7 @@ class TripleDES extends DES * * @see \phpseclib\Crypt\DES::__construct() * @see \phpseclib\Crypt\Base::__construct() - * @param optional Integer $mode + * @param Integer $mode * @access public */ function __construct($mode = Base::MODE_CBC) diff --git a/phpseclib/File/ASN1.php b/phpseclib/File/ASN1.php index fa58ec7f..fa11b7b5 100644 --- a/phpseclib/File/ASN1.php +++ b/phpseclib/File/ASN1.php @@ -1197,7 +1197,7 @@ class ASN1 * Inspired by array_shift * * @param String $string - * @param optional Integer $index + * @param Integer $index * @return String * @access private */ @@ -1215,8 +1215,8 @@ class ASN1 * No real conversion table is used. * * @param String $in - * @param optional Integer $from - * @param optional Integer $to + * @param Integer $from + * @param Integer $to * @return String * @access public */ diff --git a/phpseclib/Math/BigInteger.php b/phpseclib/Math/BigInteger.php index bc7b2269..efd0a71c 100644 --- a/phpseclib/Math/BigInteger.php +++ b/phpseclib/Math/BigInteger.php @@ -251,8 +251,8 @@ class BigInteger * ?> * * - * @param optional $x base-10 number or base-$base number if $base set. - * @param optional integer $base + * @param $x base-10 number or base-$base number if $base set. + * @param integer $base * @return \phpseclib\Math\BigInteger * @access public */ @@ -3076,7 +3076,7 @@ class BigInteger * $max->random($min) * * @param \phpseclib\Math\BigInteger $arg1 - * @param optional \phpseclib\Math\BigInteger $arg2 + * @param \phpseclib\Math\BigInteger $arg2 * @return \phpseclib\Math\BigInteger * @access public * @internal The API for creating random numbers used to be $a->random($min, $max), where $a was a BigInteger object. @@ -3157,8 +3157,8 @@ class BigInteger * give up and return false. * * @param \phpseclib\Math\BigInteger $arg1 - * @param optional \phpseclib\Math\BigInteger $arg2 - * @param optional Integer $timeout + * @param \phpseclib\Math\BigInteger $arg2 + * @param Integer $timeout * @return Mixed * @access public * @internal See {@link http://www.cacr.math.uwaterloo.ca/hac/about/chap4.pdf#page=15 HAC 4.44}. @@ -3286,7 +3286,7 @@ class BigInteger * $t parameter is distributability. BigInteger::randomPrime() can be distributed across multiple pageloads * on a website instead of just one. * - * @param optional \phpseclib\Math\BigInteger $t + * @param \phpseclib\Math\BigInteger $t * @return Boolean * @access public * @internal Uses the diff --git a/phpseclib/Net/SCP.php b/phpseclib/Net/SCP.php index ebfa999a..e35f7333 100644 --- a/phpseclib/Net/SCP.php +++ b/phpseclib/Net/SCP.php @@ -104,8 +104,8 @@ class SCP * Connects to an SSH server * * @param String $host - * @param optional Integer $port - * @param optional Integer $timeout + * @param Integer $port + * @param Integer $timeout * @return \phpseclib\Net\SCP * @access public */ @@ -139,8 +139,8 @@ class SCP * * @param String $remote_file * @param String $data - * @param optional Integer $mode - * @param optional Callable $callback + * @param Integer $mode + * @param Callable $callback * @throws \phpseclib\Exception\FileNotFoundException if you're uploading via a file and the file doesn't exist * @return Boolean * @access public @@ -214,7 +214,7 @@ class SCP * operation * * @param String $remote_file - * @param optional String $local_file + * @param String $local_file * @return Mixed * @access public */ diff --git a/phpseclib/Net/SFTP.php b/phpseclib/Net/SFTP.php index 8460a1c9..093a1fd0 100644 --- a/phpseclib/Net/SFTP.php +++ b/phpseclib/Net/SFTP.php @@ -245,8 +245,8 @@ class SFTP extends SSH2 * Connects to an SFTP server * * @param String $host - * @param optional Integer $port - * @param optional Integer $timeout + * @param Integer $port + * @param Integer $timeout * @return \phpseclib\Net\SFTP * @access public */ @@ -383,7 +383,7 @@ class SFTP extends SSH2 * Login * * @param String $username - * @param optional String $password + * @param String $password * @throws \UnexpectedValueException on receipt of unexpected packets * @return Boolean * @access public @@ -584,7 +584,7 @@ class SFTP extends SSH2 * Logs errors * * @param String $response - * @param optional Integer $status + * @param Integer $status * @access public */ function _logError($response, $status = -1) @@ -728,8 +728,8 @@ class SFTP extends SSH2 /** * Returns a list of files in the given directory * - * @param optional String $dir - * @param optional Boolean $recursive + * @param String $dir + * @param Boolean $recursive * @return Mixed * @access public */ @@ -777,8 +777,8 @@ class SFTP extends SSH2 /** * Returns a detailed list of files in the given directory * - * @param optional String $dir - * @param optional Boolean $recursive + * @param String $dir + * @param Boolean $recursive * @return Mixed * @access public */ @@ -812,7 +812,7 @@ class SFTP extends SSH2 * Reads a list, be it detailed or not, of files in the given directory * * @param String $dir - * @param optional Boolean $raw + * @param Boolean $raw * @return Mixed * @throws \UnexpectedValueException on receipt of unexpected packets * @access private @@ -1304,8 +1304,8 @@ class SFTP extends SSH2 * If the file does not exist, it will be created. * * @param String $filename - * @param optional Integer $time - * @param optional Integer $atime + * @param Integer $time + * @param Integer $atime * @throws \UnexpectedValueException on receipt of unexpected packets * @return Boolean * @access public @@ -1356,7 +1356,7 @@ class SFTP extends SSH2 * * @param String $filename * @param Integer $uid - * @param optional Boolean $recursive + * @param Boolean $recursive * @return Boolean * @access public */ @@ -1376,7 +1376,7 @@ class SFTP extends SSH2 * * @param String $filename * @param Integer $gid - * @param optional Boolean $recursive + * @param Boolean $recursive * @return Boolean * @access public */ @@ -1395,7 +1395,7 @@ class SFTP extends SSH2 * * @param Integer $mode * @param String $filename - * @param optional Boolean $recursive + * @param Boolean $recursive * @throws \UnexpectedValueException on receipt of unexpected packets * @return Mixed * @access public @@ -1790,10 +1790,10 @@ class SFTP extends SSH2 * * @param String $remote_file * @param String|resource $data - * @param optional Integer $mode - * @param optional Integer $start - * @param optional Integer $local_start - * @param optional callable|null $progressCallback + * @param Integer $mode + * @param Integer $start + * @param Integer $local_start + * @param callable|null $progressCallback * @throws \UnexpectedValueException on receipt of unexpected packets * @throws \BadFunctionCallException if you're uploading via a callback and the callback function is invalid * @throws \phpseclib\Exception\FileNotFoundException if you're uploading via a file and the file doesn't exist @@ -2012,9 +2012,9 @@ class SFTP extends SSH2 * $offset and $length can be used to download files in chunks. * * @param String $remote_file - * @param optional String $local_file - * @param optional Integer $offset - * @param optional Integer $length + * @param String $local_file + * @param Integer $offset + * @param Integer $length * @throws \UnexpectedValueException on receipt of unexpected packets * @return Mixed * @access public diff --git a/phpseclib/Net/SFTP/Stream.php b/phpseclib/Net/SFTP/Stream.php index 2758e73c..403c1d03 100644 --- a/phpseclib/Net/SFTP/Stream.php +++ b/phpseclib/Net/SFTP/Stream.php @@ -115,7 +115,7 @@ class Stream /** * Registers this class as a URL wrapper. * - * @param optional String $protocol The wrapper name to be registered. + * @param String $protocol The wrapper name to be registered. * @return Boolean True on success, false otherwise. * @access public */ diff --git a/phpseclib/Net/SSH1.php b/phpseclib/Net/SSH1.php index 918c791e..15e37061 100644 --- a/phpseclib/Net/SSH1.php +++ b/phpseclib/Net/SSH1.php @@ -498,9 +498,9 @@ class SSH1 * Connects to an SSHv1 server * * @param String $host - * @param optional Integer $port - * @param optional Integer $timeout - * @param optional Integer $cipher + * @param Integer $port + * @param Integer $timeout + * @param Integer $cipher * @return \phpseclib\Net\SSH1 * @access public */ @@ -695,7 +695,7 @@ class SSH1 * Login * * @param String $username - * @param optional String $password + * @param String $password * @return Boolean * @access public */ @@ -1285,7 +1285,7 @@ class SSH1 * Inspired by array_shift * * @param String $string - * @param optional Integer $index + * @param Integer $index * @return String * @access private */ @@ -1451,7 +1451,7 @@ class SSH1 * Returns, by default, the base-10 representation. If $raw_output is set to true, returns, instead, * the raw bytes. This behavior is similar to PHP's md5() function. * - * @param optional Boolean $raw_output + * @param Boolean $raw_output * @return String * @access public */ @@ -1466,7 +1466,7 @@ class SSH1 * Returns, by default, the base-10 representation. If $raw_output is set to true, returns, instead, * the raw bytes. This behavior is similar to PHP's md5() function. * - * @param optional Boolean $raw_output + * @param Boolean $raw_output * @return String * @access public */ @@ -1481,7 +1481,7 @@ class SSH1 * Returns, by default, the base-10 representation. If $raw_output is set to true, returns, instead, * the raw bytes. This behavior is similar to PHP's md5() function. * - * @param optional Boolean $raw_output + * @param Boolean $raw_output * @return String * @access public */ @@ -1496,7 +1496,7 @@ class SSH1 * Returns, by default, the base-10 representation. If $raw_output is set to true, returns, instead, * the raw bytes. This behavior is similar to PHP's md5() function. * - * @param optional Boolean $raw_output + * @param Boolean $raw_output * @return String * @access public */ @@ -1512,7 +1512,7 @@ class SSH1 * is set to true, returns, instead, an array of constants. ie. instead of array('Triple-DES in CBC mode'), you'll * get array(self::CIPHER_3DES). * - * @param optional Boolean $raw_output + * @param Boolean $raw_output * @return Array * @access public */ @@ -1528,7 +1528,7 @@ class SSH1 * is set to true, returns, instead, an array of constants. ie. instead of array('password authentication'), you'll * get array(self::AUTH_PASSWORD). * - * @param optional Boolean $raw_output + * @param Boolean $raw_output * @return Array * @access public */ diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index 0daf81dc..9790162a 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -873,8 +873,8 @@ class SSH2 * $host can either be a string, representing the host, or a stream resource. * * @param Mixed $host - * @param optional Integer $port - * @param optional Integer $timeout + * @param Integer $port + * @param Integer $timeout * @see \phpseclib\Net\SSH2::login() * @return \phpseclib\Net\SSH2 * @access public @@ -1886,7 +1886,7 @@ class SSH2 * Login Helper * * @param String $username - * @param optional String $password + * @param String $password * @return Boolean * @throws \UnexpectedValueException on receipt of unexpected packets * @throws \RuntimeException on other errors @@ -2355,7 +2355,7 @@ class SSH2 * In all likelihood, this is not a feature you want to be taking advantage of. * * @param String $command - * @param optional Callback $callback + * @param Callback $callback * @return String * @throws \RuntimeException on connection error * @access public @@ -3364,7 +3364,7 @@ class SSH2 * See '6. Binary Packet Protocol' of rfc4253 for more info. * * @param String $data - * @param optional String $logged + * @param String $logged * @see \phpseclib\Net\SSH2::_get_binary_packet() * @return Boolean * @access private @@ -3602,7 +3602,7 @@ class SSH2 * Inspired by array_shift * * @param String $string - * @param optional Integer $index + * @param Integer $index * @return String * @access private */