Documentation
authorSam Reed <reedy@users.mediawiki.org>
Wed, 4 May 2011 21:23:25 +0000 (21:23 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Wed, 4 May 2011 21:23:25 +0000 (21:23 +0000)
Remove unused variables

includes/HTMLForm.php
includes/Html.php
includes/parser/LinkHolderArray.php

index c7cf929..e5f7a4c 100644 (file)
@@ -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 );
                        }
index daef9e0..ea33533 100644 (file)
@@ -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;
index b724990..9d0e1bc 100644 (file)
@@ -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 );