From: Sam Reed Date: Sat, 21 May 2011 19:36:03 +0000 (+0000) Subject: More comment updates, addition of some braces also X-Git-Tag: 1.31.0-rc.0~30030 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=85a15bea84a095cc1ed967b1091626a4c3763d74;p=lhc%2Fweb%2Fwiklou.git More comment updates, addition of some braces also --- diff --git a/includes/UserArray.php b/includes/UserArray.php index d48a4440bf..a69df41ef1 100644 --- a/includes/UserArray.php +++ b/includes/UserArray.php @@ -1,6 +1,11 @@ select( 'user', '*', array( 'user_id' => $ids ), __METHOD__ ); diff --git a/includes/UserMailer.php b/includes/UserMailer.php index c27997e06e..f40e9b8d1b 100644 --- a/includes/UserMailer.php +++ b/includes/UserMailer.php @@ -31,7 +31,7 @@ */ class MailAddress { /** - * @param $address Mixed: string with an email address, or a User object + * @param $address string|User string with an email address, or a User object * @param $name String: human-readable name if a string address is given * @param $realName String: human-readable real name if a string address is given */ @@ -82,6 +82,13 @@ class UserMailer { /** * Send mail using a PEAR mailer + * + * @param $mailer + * @param $dest + * @param $headers + * @param $body + * + * @return Status */ protected static function sendWithPear( $mailer, $dest, $headers, $body ) { $mailResult = $mailer->send( $dest, $headers, $body ); @@ -138,15 +145,18 @@ class UserMailer { require_once( 'Mail.php' ); $msgid = str_replace( " ", "_", microtime() ); - if ( function_exists( 'posix_getpid' ) ) + if ( function_exists( 'posix_getpid' ) ) { $msgid .= '.' . posix_getpid(); + } if ( is_array( $to ) ) { $dest = array(); - foreach ( $to as $u ) + foreach ( $to as $u ) { $dest[] = $u->address; - } else + } + } else { $dest = $to->address; + } $headers['From'] = $from->toString(); @@ -256,6 +266,8 @@ class UserMailer { /** * Converts a string into a valid RFC 822 "phrase", such as is used for the sender name + * @param $phrase string + * @return string */ public static function rfc822Phrase( $phrase ) { $phrase = strtr( $phrase, array( "\r" => '', "\n" => '', '"' => '' ) ); @@ -332,8 +344,9 @@ class EmailNotification { public function notifyOnPageChange( $editor, $title, $timestamp, $summary, $minorEdit, $oldid = false ) { global $wgEnotifUseJobQ, $wgEnotifWatchlist, $wgShowUpdatedMarker; - if ( $title->getNamespace() < 0 ) + if ( $title->getNamespace() < 0 ) { return; + } // Build a list of users to notfiy $watchers = array(); @@ -385,7 +398,7 @@ class EmailNotification { } - /* + /** * Immediate version of notifyOnPageChange(). * * Send emails corresponding to the user $editor editing the page $title. @@ -505,7 +518,7 @@ class EmailNotification { } if ( $wgEnotifImpersonal && $this->oldid ) { - /* + /** * For impersonal mail, show a diff link to the last * revision. */ diff --git a/includes/XmlTypeCheck.php b/includes/XmlTypeCheck.php index a004ef4d7c..78dd259dd5 100644 --- a/includes/XmlTypeCheck.php +++ b/includes/XmlTypeCheck.php @@ -34,11 +34,16 @@ class XmlTypeCheck { /** * Get the root element. Simple accessor to $rootElement + * + * @return string */ public function getRootElement() { return $this->rootElement; } + /** + * @param $fname + */ private function run( $fname ) { $parser = xml_parser_create_ns( 'UTF-8' ); @@ -65,6 +70,11 @@ class XmlTypeCheck { xml_parser_free( $parser ); } + /** + * @param $parser + * @param $name + * @param $attribs + */ private function rootElementOpen( $parser, $name, $attribs ) { $this->rootElement = $name; @@ -76,7 +86,12 @@ class XmlTypeCheck { xml_set_element_handler( $parser, false, false ); } } - + + /** + * @param $parser + * @param $name + * @param $attribs + */ private function elementOpen( $parser, $name, $attribs ) { if( call_user_func( $this->filterCallback, $name, $attribs ) ) { // Filter hit!