Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.4.7

Request #8453 PHPDoc updates
Submitted: 2006-08-16 08:16 UTC
From: selsky at columbia dot edu Assigned: amistry
Status: Closed Package: Net_Sieve (version CVS)
PHP Version: 5.0.5 OS: Solaris 9
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 45 - 5 = ?

 
 [2006-08-16 08:16 UTC] selsky at columbia dot edu (Matt Selsky)
Description: ------------ The following patch against CVS HEAD, documents a few parameters, removed some unnecessary phpdoc (@access public is the default and therefore redundant), and removed some unneeded whitespace. diff -u -r1.11 Sieve.php --- Sieve.php 16 Aug 2006 07:52:41 -0000 1.11 +++ Sieve.php 16 Aug 2006 08:13:21 -0000 @@ -63,9 +63,10 @@ /** * A class for talking to the timsieved server which -* comes with Cyrus IMAP. the HAVESPACE -* command which appears to be broken (Cyrus 2.0.16). +* comes with Cyrus IMAP. +* * SIEVE: RFC3028 http://www.ietf.org/rfc/rfc3028.txt +* MANAGE-SIEVE: http://www.ietf.org/internet-drafts/draft- martin-managesieve-06.txt * * @author Richard Heyes <richard@php.net> * @author Damian Fernandez Sosa <damlists@cnba.uba.ar> @@ -146,7 +147,6 @@ * any generated error in $this->_error, which can be retrieved * using the getError() method. * - * @access public * @param string $user Login username * @param string $pass Login password * @param string $host Hostname of server @@ -196,6 +196,8 @@ * on the server * * @access private + * @param mixed $msg Text error message or PEAR error object + * @param integer $code Numeric error code * @return PEAR_Error */ @@ -237,7 +239,6 @@ * Returns an indexed array of scripts currently * on the server * - * @access public * @return mixed Indexed array of scriptnames or PEAR_Error on failure */ function listScripts() @@ -253,7 +254,6 @@ /** * Returns the active script * - * @access public * @return mixed The active scriptname or PEAR_Error on failure */ function getActive() @@ -270,7 +270,6 @@ /** * Sets the active script * - * @access public * @param string $scriptname The name of the script to be set as active * @return mixed true on success, PEAR_Error on failure */ @@ -282,7 +281,6 @@ /** * Retrieves a script * - * @access public * @param string $scriptname The name of the script to be retrieved * @return mixed The script on success, PEAR_Error on failure */ @@ -294,10 +292,9 @@ /** * Adds a script to the server * - * @access public * @param string $scriptname Name of the script * @param string $script The script - * @param bool $makeactive Whether to make this the active script + * @param boolean $makeactive Whether to make this the active script * @return mixed true on success, PEAR_Error on failure */ function installScript($scriptname, $script, $makeactive = false) @@ -316,7 +313,6 @@ /** * Removes a script from the server * - * @access public * @param string $scriptname Name of the script * @return mixed True on success, PEAR_Error on failure */ @@ -329,7 +325,6 @@ * Returns any error that may have been generated in the * constructor * - * @access public * @return mixed False if no error, PEAR_Error otherwise */ function getError() @@ -393,7 +388,6 @@ /** * Logs into server. * - * @access public * @param string $user Login username * @param string $pass Login password * @param string $logintype Type of login method to use @@ -424,10 +418,10 @@ /* Handles the authentication using any known method * - * @param string The userid to authenticate as. - * @param string The password to authenticate with. - * @param string The method to use ( if $usermethod == '' then the class chooses the best method (the stronger is the best ) ) - * @param string The effective uid to authenticate as. + * @param string $uid The userid to authenticate as. + * @param string $pwd The password to authenticate with. + * @param string $userMethod The method to use ( if $userMethod == '' then the class chooses the best method (the stronger is the best ) ) + * @param string $euser The effective uid to authenticate as. * * @return mixed string or PEAR_Error * @@ -436,8 +430,6 @@ */ function _cmdAuthenticate($uid , $pwd , $userMethod = null , $euser = '' ) { - - if ( PEAR::isError( $method = $this- >_getBestAuthMethod($userMethod) ) ) { return $method; } @@ -477,9 +469,9 @@ /* Authenticates the user using the PLAIN method. * - * @param string The userid to authenticate as. - * @param string The password to authenticate with. - * @param string The effective uid to authenticate as. + * @param string $user The userid to authenticate as. + * @param string $pass The password to authenticate with. + * @param string $euser The effective uid to authenticate as. * * @return array Returns an array containing the response * @@ -502,9 +494,9 @@ /* Authenticates the user using the PLAIN method. * - * @param string The userid to authenticate as. - * @param string The password to authenticate with. - * @param string The effective uid to authenticate as. + * @param string $user The userid to authenticate as. + * @param string $pass The password to authenticate with. + * @param string $euser The effective uid to authenticate as. * * @return array Returns an array containing the response * @@ -524,9 +516,9 @@ /* Authenticates the user using the CRAM-MD5 method. * - * @param string The userid to authenticate as. - * @param string The password to authenticate with. - * @param string The cmdID. + * @param string $uid The userid to authenticate as. + * @param string $pwd The password to authenticate with. + * @param string $euser The effective uid to authenticate as. * * @return array Returns an array containing the response * @@ -559,9 +551,9 @@ /* Authenticates the user using the DIGEST-MD5 method. * - * @param string The userid to authenticate as. - * @param string The password to authenticate with. - * @param string The efective user + * @param string $uid The userid to authenticate as. + * @param string $pwd The password to authenticate with. + * @param string $euser The effective uid to authenticate as. * * @return array Returns an array containing the response * @@ -753,6 +745,7 @@ * Sends the LOGOUT command and terminates the connection * * @access private + * @param boolean $sendLogoutCMD True to send LOGOUT command before disconnecting * @return mixed True on success, PEAR_Error otherwise */ function _cmdLogout($sendLogoutCMD=true) @@ -801,11 +794,11 @@ * Checks if the server has space to store the script * by the server * - * @access public * @param string $scriptname The name of the script to mark as active + * @param integer $size The size of the script * @return mixed True on success, PEAR_Error otherwise */ - function haveSpace($scriptname,$quota) + function haveSpace($scriptname,$size) { if (NET_SIEVE_STATE_TRANSACTION != $this->_state) { $msg='Not currently in TRANSACTION state'; @@ -813,8 +806,7 @@ return $this->_raiseError($msg,$code); } - if (PEAR::isError($res = $this->_doCmd(sprintf ('HAVESPACE "%s" %s', $scriptname, $quota) ) ) ) { - //if (PEAR::isError($res = $this->_doCmd(sprintf ('HAVESPACE %d "%s"', $quota,$scriptname ) ) ) ) { + if (PEAR::isError($res = $this->_doCmd(sprintf ('HAVESPACE "%s" %d', $scriptname, $size) ) ) ) { return $res; } @@ -825,10 +817,11 @@ /** - * Parses the response from the capability command. Storesq + * Parses the response from the capability command. Stores * the result in $this->_capability * * @access private + * @param string $data The response from the capability command */ function _parseCapability($data) { @@ -903,7 +896,7 @@ { $lastline=''; if (PEAR::isError( $lastline = $this->_sock->gets( 8192 ) ) ) { - return new PEAR_Error('Failed to write to socket: ' . $lastline->getMessage() ); + return new PEAR_Error( 'Failed to write to socket: ' . $lastline->getMessage() ); } $lastline=rtrim($lastline); if($this->_debug){ @@ -912,7 +905,7 @@ } if( $lastline === '' ) { - return new PEAR_Error('Failed to receive from the socket' ); + return new PEAR_Error( 'Failed to receive from the socket' ); } return $lastline; @@ -1020,7 +1013,6 @@ /** * Sets the bebug state * - * @access public * @return void */ function setDebug($debug = true) @@ -1031,7 +1023,6 @@ /** * Disconnect from the Sieve server * - * @access public * @param string $scriptname The name of the script to be set as active * @return mixed true on success, PEAR_Error on failure */ @@ -1093,7 +1084,6 @@ /** * Return the list of extensions the server supports * - * @access public * @return mixed array on success, PEAR_Error on failure */ function getExtensions() @@ -1114,7 +1104,6 @@ /** * Return true if tyhe server has that extension * - * @access public * @param string the extension to compare * @return mixed array on success, PEAR_Error on failure */ @@ -1140,7 +1129,6 @@ /** * Return the list of auth methods the server supports * - * @access public * @return mixed array on success, PEAR_Error on failure */ function getAuthMechs() @@ -1163,7 +1151,6 @@ /** * Return true if the server has that extension * - * @access public * @param string the extension to compare * @return mixed array on success, PEAR_Error on failure */

Comments

 [2006-08-16 08:22 UTC] amistry at php dot net (Anish Mistry)
Would you link to this patch or email it to me? You may want to double check your patch as I've been updating things over the past 30 minutes. Thanks.
 [2006-08-16 14:49 UTC] amistry at php dot net (Anish Mistry)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.