From 78f05f39e1d546d1cd3eee13f2ce5c223c2da5fc Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Sat, 5 Nov 2011 14:10:50 +0000 Subject: [PATCH] Partial revert to r101244 due to next() weirdness --- includes/MagicWord.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/includes/MagicWord.php b/includes/MagicWord.php index 99aca4a78c..563d3a5621 100644 --- a/includes/MagicWord.php +++ b/includes/MagicWord.php @@ -228,6 +228,7 @@ class MagicWord { /** * Get an array of parser substitution modifier IDs + * @return array */ static function getSubstIDs() { return self::$mSubstIDs; @@ -236,9 +237,10 @@ class MagicWord { /** * Allow external reads of TTL array * + * @param $id int * @return array */ - static function getCacheTTL($id) { + static function getCacheTTL( $id ) { if ( array_key_exists( $id, self::$mCacheTTLs ) ) { return self::$mCacheTTLs[$id]; } else { @@ -383,7 +385,7 @@ class MagicWord { /** * Returns true if the text contains the word * - * @paran $text string + * @param $text string * * @return bool */ @@ -712,7 +714,7 @@ class MagicWordArray { /** * Get a regex anchored to the start of the string that does not match parameters * - * @return string + * @return array */ function getRegexStart() { $base = $this->getBaseRegex(); @@ -729,7 +731,7 @@ class MagicWordArray { /** * Get an anchored regex for matching variables with parameters * - * @return string + * @return array */ function getVariableStartToEndRegex() { $base = $this->getBaseRegex(); @@ -754,7 +756,7 @@ class MagicWordArray { */ function parseMatch( $m ) { reset( $m ); - foreach ( $m as $key => $value ) { + while ( list( $key, $value ) = each( $m ) ) { if ( $key === 0 || $value === '' ) { continue; } -- 2.20.1