From 2f23e714902df2da216fe7b5bd09cb5d455a5020 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Tue, 1 Nov 2011 23:48:09 +0000 Subject: [PATCH] arrray -> array Whitespace Other documentation improvements Comment out some unused code (which has a fixme left with it already) --- includes/MWFunction.php | 19 +++++++++++++++++++ includes/MagicWord.php | 2 +- includes/api/ApiQueryCategoryMembers.php | 2 +- includes/db/Database.php | 2 ++ includes/mime.types | 2 +- includes/specials/SpecialWantedpages.php | 4 ++-- maintenance/Maintenance.php | 3 +++ 7 files changed, 29 insertions(+), 5 deletions(-) diff --git a/includes/MWFunction.php b/includes/MWFunction.php index 53ce446ed8..0113f91754 100644 --- a/includes/MWFunction.php +++ b/includes/MWFunction.php @@ -20,6 +20,11 @@ class MWFunction { + /** + * @param $callback + * @return array + * @throws MWException + */ protected static function cleanCallback( $callback ) { if( is_string( $callback ) ) { if ( strpos( $callback, '::' ) !== false ) { @@ -39,6 +44,10 @@ class MWFunction { return $callback; } + /** + * @param $callback + * @return mixed + */ public static function call( $callback ) { $callback = self::cleanCallback( $callback ); @@ -47,11 +56,21 @@ class MWFunction { return call_user_func_array( 'call_user_func', $args ); } + /** + * @param $callback + * @param $argsarams + * @return mixed + */ public static function callArray( $callback, $argsarams ) { $callback = self::cleanCallback( $callback ); return call_user_func_array( $callback, $argsarams ); } + /** + * @param $class + * @param $args array + * @return object + */ public static function newObj( $class, $args = array() ) { if( !count( $args ) ) { return new $class; diff --git a/includes/MagicWord.php b/includes/MagicWord.php index 136aac93ad..99aca4a78c 100644 --- a/includes/MagicWord.php +++ b/includes/MagicWord.php @@ -748,7 +748,7 @@ class MagicWordArray { * Returns array(magic word ID, parameter value) * If there is no parameter value, that element will be false. * - * @param $m arrray + * @param $m array * * @return array */ diff --git a/includes/api/ApiQueryCategoryMembers.php b/includes/api/ApiQueryCategoryMembers.php index 98a4eace0d..0fe1489a5b 100644 --- a/includes/api/ApiQueryCategoryMembers.php +++ b/includes/api/ApiQueryCategoryMembers.php @@ -153,7 +153,7 @@ class ApiQueryCategoryMembers extends ApiQueryGeneratorBase { $endsortkey = $params['endsortkeyprefix'] !== null ? Collation::singleton()->getSortkey( $params['endsortkeyprefix'] ) : $params['endsortkey']; - + // The below produces ORDER BY cl_sortkey, cl_from, possibly with DESC added to each of them $this->addWhereRange( 'cl_sortkey', $dir, diff --git a/includes/db/Database.php b/includes/db/Database.php index 4d1830dd30..4967d77ed7 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -3192,6 +3192,8 @@ abstract class DatabaseBase implements DatabaseType { /** * Get schema variables. If none have been set via setSchemaVars(), then * use some defaults from the current object. + * + * @return array */ protected function getSchemaVars() { if ( $this->mSchemaVars ) { diff --git a/includes/mime.types b/includes/mime.types index 0e0b06760f..3bba192ee7 100644 --- a/includes/mime.types +++ b/includes/mime.types @@ -59,7 +59,7 @@ application/xhtml+xml xhtml xht application/xslt+xml xslt application/xml xml xsl xsd application/xml-dtd dtd -application/zip zip jar xpi sxc stc sxd std sxi sti sxm stm sxw stw +application/zip zip jar xpi sxc stc sxd std sxi sti sxm stm sxw stw application/x-rar rar audio/basic au snd audio/midi mid midi kar diff --git a/includes/specials/SpecialWantedpages.php b/includes/specials/SpecialWantedpages.php index a655d44591..3a5d9d32d9 100644 --- a/includes/specials/SpecialWantedpages.php +++ b/includes/specials/SpecialWantedpages.php @@ -39,10 +39,10 @@ class WantedPagesPage extends WantedQueryPage { $parts = explode( '/', $par, 2 ); $this->limit = (int)$parts[0]; // @todo FIXME: nlinks is ignored - $nlinks = isset( $parts[1] ) && $parts[1] === 'nlinks'; + //$nlinks = isset( $parts[1] ) && $parts[1] === 'nlinks'; $this->offset = 0; } else { - $nlinks = true; + //$nlinks = true; } $this->setListoutput( $inc ); $this->shownavigation = !$inc; diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php index 5e7f0d4dec..67d50cf886 100644 --- a/maintenance/Maintenance.php +++ b/maintenance/Maintenance.php @@ -456,6 +456,9 @@ abstract class Maintenance { } } + /** + * @var $child Maintenance + */ $child = new $maintClass(); $child->loadParamsAndArgs( $this->mSelf, $this->mOptions, $this->mArgs ); if ( !is_null( $this->mDb ) ) { -- 2.20.1