From ee40f73227611f1638b5ed79a3ab1f3b569a286d Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Sat, 25 Sep 2010 16:56:03 +0000 Subject: [PATCH] Remove some unused keys from foreach Documentation tweaks --- includes/api/ApiFormatXml.php | 2 +- includes/api/ApiMain.php | 4 ++-- includes/api/ApiQueryImageInfo.php | 5 +++++ includes/api/ApiUpload.php | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/includes/api/ApiFormatXml.php b/includes/api/ApiFormatXml.php index f725a26fe4..29d40d089e 100644 --- a/includes/api/ApiFormatXml.php +++ b/includes/api/ApiFormatXml.php @@ -155,7 +155,7 @@ class ApiFormatXml extends ApiFormatBase { $retval .= self::recXmlPrint( $subElemId, $subElemValue, $indent ); } - foreach ( $indElements as $subElemId => & $subElemValue ) { + foreach ( $indElements as &$subElemValue ) { $retval .= self::recXmlPrint( $subElemIndName, $subElemValue, $indent ); } diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index 1cf0281a1b..e490ece2fe 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -583,7 +583,7 @@ class ApiMain extends ApiBase { /** * Check for sufficient permissions to execute - * @param $module object An Api module + * @param $module ApiBase An Api module */ protected function checkExecutePermissions( $module ) { global $wgUser; @@ -607,7 +607,7 @@ class ApiMain extends ApiBase { /** * Check POST for external response and setup result printer - * @param $module object An Api module + * @param $module ApiBase An Api module * @param $params Array an array with the request parameters */ protected function setupExternalResponse( $module, $params ) { diff --git a/includes/api/ApiQueryImageInfo.php b/includes/api/ApiQueryImageInfo.php index d3c785bc32..68155b0a76 100644 --- a/includes/api/ApiQueryImageInfo.php +++ b/includes/api/ApiQueryImageInfo.php @@ -264,6 +264,11 @@ class ApiQueryImageInfo extends ApiQueryBase { return $vals; } + /* + * + * param $metadata Array + * param $result ApiResult + */ public static function processMetaData( $metadata, $result ) { $retval = array(); if ( is_array( $metadata ) ) { diff --git a/includes/api/ApiUpload.php b/includes/api/ApiUpload.php index f64cb37419..1cc903439a 100644 --- a/includes/api/ApiUpload.php +++ b/includes/api/ApiUpload.php @@ -285,7 +285,7 @@ class ApiUpload extends ApiBase { if ( isset( $warnings['duplicate'] ) ) { $dupes = array(); - foreach ( $warnings['duplicate'] as $key => $dupe ) { + foreach ( $warnings['duplicate'] as $dupe ) { $dupes[] = $dupe->getName(); } $this->getResult()->setIndexedTagName( $dupes, 'duplicate' ); -- 2.20.1