From 5db2450c55f992cbbfc00e27593a66eddb26b32e Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Wed, 4 May 2011 21:23:25 +0000 Subject: [PATCH] Documentation Remove unused variables --- includes/HTMLForm.php | 2 +- includes/Html.php | 15 +++++++++++++-- includes/parser/LinkHolderArray.php | 2 +- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/includes/HTMLForm.php b/includes/HTMLForm.php index c7cf929b20..e5f7a4c4f5 100644 --- a/includes/HTMLForm.php +++ b/includes/HTMLForm.php @@ -1346,7 +1346,7 @@ class HTMLSelectField extends HTMLFormField { # If one of the options' 'name' is int(0), it is automatically selected. # because PHP sucks and thinks int(0) == 'some string'. # Working around this by forcing all of them to strings. - foreach( $this->mParams['options'] as $key => &$opt ){ + foreach( $this->mParams['options'] as &$opt ){ if( is_int( $opt ) ){ $opt = strval( $opt ); } diff --git a/includes/Html.php b/includes/Html.php index daef9e0e44..ea335334c3 100644 --- a/includes/Html.php +++ b/includes/Html.php @@ -107,8 +107,8 @@ class Html { * features might be added, like allowing arrays for the values of * attributes like class= and media=. * - * @param $element string The element's name, e.g., 'a' - * @param $attribs array Associative array of attributes, e.g., array( + * @param $element string The element's name, e.g., 'a' + * @param $attribs array Associative array of attributes, e.g., array( * 'href' => 'http://www.mediawiki.org/' ). See expandAttributes() for * further documentation. * @param $contents string The raw HTML contents of the element: *not* @@ -132,6 +132,12 @@ class Html { /** * Identical to rawElement(), but HTML-escapes $contents (like * Xml::element()). + * + * @param $element string + * @param $attribs array + * @param $contents string + * + * @return string */ public static function element( $element, $attribs = array(), $contents = '' ) { return self::rawElement( $element, $attribs, strtr( $contents, array( @@ -145,6 +151,11 @@ class Html { /** * Identical to rawElement(), but has no third parameter and omits the end * tag (and the self-closing '/' in XML mode for empty elements). + * + * @param $element string + * @param $attribs array + * + * @return string */ public static function openElement( $element, $attribs = array() ) { global $wgHtml5, $wgWellFormedXml; diff --git a/includes/parser/LinkHolderArray.php b/includes/parser/LinkHolderArray.php index b7249901c5..9d0e1bcc1f 100644 --- a/includes/parser/LinkHolderArray.php +++ b/includes/parser/LinkHolderArray.php @@ -63,7 +63,7 @@ class LinkHolderArray { unset( $nsLinks ); unset( $entry ); - foreach ( $this->interwikis as $key => &$entry ) { + foreach ( $this->interwikis as &$entry ) { $entry['title'] = Title::newFromText( $entry['pdbk'] ); } unset( $entry ); -- 2.20.1