Re: cvs: pear /Net_Monitor/Monitor/Alert Jabber.php

From: Date: Mon, 23 May 2005 19:58:05 +0000
Subject: Re: cvs: pear /Net_Monitor/Monitor/Alert Jabber.php
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-37811@lists.php.net to get a copy of this message
Hi Dan, Thanks. This hasn't been released anywhere. Just checking it in to show a colleague. Apparently the class template I based this on is now out-of-date (though it wasn't at the time). Obviously we'll clean this up before release. Best, Robert Daniel Convissor wrote:
Hi Robert:
+++ pear/Net_Monitor/Monitor/Alert/Jabber.php <?php // +----------------------------------------------------------------------+
// | PHP Version 4                                                        |
// +----------------------------------------------------------------------+
Please just use the new header docblocks, as per the coding standards, and have them conform to the format specified in the standards.
var $_alert = null; /**
    * The default port to be used
   
Please add a blank line between the var and the next docblock in order to make the code more readable (as per coding standards).
/**
    * function alert
    *
    * Sends the alerts thru the specified Jabber servers and accounts
    * <li> $server is an array of key=>value
    *      where value is a string.
    *      Server defines these keys:
    *      <ul>
    *      <li> server - The server to connect to. Mandatory.
    *      <li> recipient - The recipient of the message. Mandatory.
    *      <li> login - The login to use for Jabber authentication. Mandatory.
    *      <li> password - The password to use for Jabber authentication. Mandatory.
    *      </ul>
    * <li> $results is the array of results to send
    * </ul>
    * Returns true on success, PEAR_Error object on failure
    *
    * @access private
    * @param array server
    * @param array results
    * @param array options
    * @return mixed true or PEAR_Error
    */
   function alert($server,$result_array,$options=array())    
Please put spaces between the "," and the "$". Please put the @access on the bottom of the @ tag list. In the docblocks, please put "$" before the parameter name and add text describing the parameter. Also, the first line of the docblock should provide a short description of the method. It should not be the name of the method, let alone contain the word "function". In short: please carefully read the "Sample File" found in the coding standards. It provides detailed descriptions of how to write docblocks and provides examples. Thanks, --Dan


« previous php.pear.dev (#37811) next »