From: Sam Reed Date: Sat, 5 Nov 2011 14:10:50 +0000 (+0000) Subject: Partial revert to r101244 due to next() weirdness X-Git-Tag: 1.31.0-rc.0~26692 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=78f05f39e1d546d1cd3eee13f2ce5c223c2da5fc;p=lhc%2Fweb%2Fwiklou.git Partial revert to r101244 due to next() weirdness --- 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; }