jenkins-bot has submitted this change and it was merged.
Change subject: Add access modifiers to MagicWord.php
......................................................................
Add access modifiers to MagicWord.php
Change-Id: I3588d9d2c17203ec3ff11736cd6ce84f687677a5
---
M includes/MagicWord.php
1 file changed, 39 insertions(+), 39 deletions(-)
Approvals:
Krinkle: Looks good to me, but someone else must approve
Legoktm: Looks good to me, approved
Florianschmidtwelzow: Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/includes/MagicWord.php b/includes/MagicWord.php
index 9ba4311..13f706d 100644
--- a/includes/MagicWord.php
+++ b/includes/MagicWord.php
@@ -92,8 +92,8 @@
/** @var bool */
private $mFound = false;
- static public $mVariableIDsInitialised = false;
- static public $mVariableIDs = [
+ public static $mVariableIDsInitialised = false;
+ public static $mVariableIDs = [
'!',
'currentmonth',
'currentmonth1',
@@ -174,7 +174,7 @@
];
/* Array of caching hints for ParserCache */
- static public $mCacheTTLs = [
+ public static $mCacheTTLs = [
'currentmonth' => 86400,
'currentmonth1' => 86400,
'currentmonthname' => 86400,
@@ -215,7 +215,7 @@
'numberingroup' => 3600,
];
- static public $mDoubleUnderscoreIDs = [
+ public static $mDoubleUnderscoreIDs = [
'notoc',
'nogallery',
'forcetoc',
@@ -231,17 +231,17 @@
'nocontentconvert',
];
- static public $mSubstIDs = [
+ public static $mSubstIDs = [
'subst',
'safesubst',
];
- static public $mObjects = [];
- static public $mDoubleUnderscoreArray = null;
+ public static $mObjects = [];
+ public static $mDoubleUnderscoreArray = null;
/**#@-*/
- function __construct( $id = 0, $syn = [], $cs = false ) {
+ public function __construct( $id = 0, $syn = [], $cs = false ) {
$this->mId = $id;
$this->mSynonyms = (array)$syn;
$this->mCaseSensitive = $cs;
@@ -254,7 +254,7 @@
*
* @return MagicWord
*/
- static function &get( $id ) {
+ public static function &get( $id ) {
if ( !isset( self::$mObjects[$id] ) ) {
$mw = new MagicWord();
$mw->load( $id );
@@ -268,7 +268,7 @@
*
* @return array
*/
- static function getVariableIDs() {
+ public static function getVariableIDs() {
if ( !self::$mVariableIDsInitialised ) {
# Get variable IDs
Hooks::run( 'MagicWordwgVariableIDs', [
&self::$mVariableIDs ] );
@@ -281,7 +281,7 @@
* Get an array of parser substitution modifier IDs
* @return array
*/
- static function getSubstIDs() {
+ public static function getSubstIDs() {
return self::$mSubstIDs;
}
@@ -291,7 +291,7 @@
* @param int $id
* @return int
*/
- static function getCacheTTL( $id ) {
+ public static function getCacheTTL( $id ) {
if ( array_key_exists( $id, self::$mCacheTTLs ) ) {
return self::$mCacheTTLs[$id];
} else {
@@ -304,7 +304,7 @@
*
* @return MagicWordArray
*/
- static function getDoubleUnderscoreArray() {
+ public static function getDoubleUnderscoreArray() {
if ( is_null( self::$mDoubleUnderscoreArray ) ) {
Hooks::run( 'GetDoubleUnderscoreIDs', [
&self::$mDoubleUnderscoreIDs ] );
self::$mDoubleUnderscoreArray = new MagicWordArray(
self::$mDoubleUnderscoreIDs );
@@ -326,7 +326,7 @@
* @param int $id
* @throws MWException
*/
- function load( $id ) {
+ public function load( $id ) {
global $wgContLang;
$this->mId = $id;
$wgContLang->getMagic( $this );
@@ -340,7 +340,7 @@
* Preliminary initialisation
* @private
*/
- function initRegex() {
+ public function initRegex() {
// Sort the synonyms by length, descending, so that the longest
synonym
// matches in precedence to the shortest
$synonyms = $this->mSynonyms;
@@ -372,7 +372,7 @@
*
* @return int
*/
- function compareStringLength( $s1, $s2 ) {
+ public function compareStringLength( $s1, $s2 ) {
$l1 = strlen( $s1 );
$l2 = strlen( $s2 );
if ( $l1 < $l2 ) {
@@ -389,7 +389,7 @@
*
* @return string
*/
- function getRegex() {
+ public function getRegex() {
if ( $this->mRegex == '' ) {
$this->initRegex();
}
@@ -403,7 +403,7 @@
*
* @return string
*/
- function getRegexCase() {
+ public function getRegexCase() {
if ( $this->mRegex === '' ) {
$this->initRegex();
}
@@ -416,7 +416,7 @@
*
* @return string
*/
- function getRegexStart() {
+ public function getRegexStart() {
if ( $this->mRegex == '' ) {
$this->initRegex();
}
@@ -429,7 +429,7 @@
* @return string
* @since 1.23
*/
- function getRegexStartToEnd() {
+ public function getRegexStartToEnd() {
if ( $this->mRegexStartToEnd == '' ) {
$this->initRegex();
}
@@ -441,7 +441,7 @@
*
* @return string
*/
- function getBaseRegex() {
+ public function getBaseRegex() {
if ( $this->mRegex == '' ) {
$this->initRegex();
}
@@ -455,7 +455,7 @@
*
* @return bool
*/
- function match( $text ) {
+ public function match( $text ) {
return (bool)preg_match( $this->getRegex(), $text );
}
@@ -466,7 +466,7 @@
*
* @return bool
*/
- function matchStart( $text ) {
+ public function matchStart( $text ) {
return (bool)preg_match( $this->getRegexStart(), $text );
}
@@ -478,7 +478,7 @@
* @return bool
* @since 1.23
*/
- function matchStartToEnd( $text ) {
+ public function matchStartToEnd( $text ) {
return (bool)preg_match( $this->getRegexStartToEnd(), $text );
}
@@ -492,7 +492,7 @@
*
* @return string
*/
- function matchVariableStartToEnd( $text ) {
+ public function matchVariableStartToEnd( $text ) {
$matches = [];
$matchcount = preg_match( $this->getVariableStartToEndRegex(),
$text, $matches );
if ( $matchcount == 0 ) {
@@ -521,7 +521,7 @@
*
* @return bool
*/
- function matchAndRemove( &$text ) {
+ public function matchAndRemove( &$text ) {
$this->mFound = false;
$text = preg_replace_callback(
$this->getRegex(),
@@ -536,7 +536,7 @@
* @param string $text
* @return bool
*/
- function matchStartAndRemove( &$text ) {
+ public function matchStartAndRemove( &$text ) {
$this->mFound = false;
$text = preg_replace_callback(
$this->getRegexStart(),
@@ -552,7 +552,7 @@
*
* @return string
*/
- function pregRemoveAndRecord() {
+ public function pregRemoveAndRecord() {
$this->mFound = true;
return '';
}
@@ -566,7 +566,7 @@
*
* @return string
*/
- function replace( $replacement, $subject, $limit = -1 ) {
+ public function replace( $replacement, $subject, $limit = -1 ) {
$res = preg_replace(
$this->getRegex(),
StringUtils::escapeRegexReplacement( $replacement ),
@@ -587,7 +587,7 @@
*
* @return string
*/
- function substituteCallback( $text, $callback ) {
+ public function substituteCallback( $text, $callback ) {
$res = preg_replace_callback( $this->getVariableRegex(),
$callback, $text );
$this->mModified = $res !== $text;
return $res;
@@ -598,7 +598,7 @@
*
* @return string
*/
- function getVariableRegex() {
+ public function getVariableRegex() {
if ( $this->mVariableRegex == '' ) {
$this->initRegex();
}
@@ -610,7 +610,7 @@
*
* @return string
*/
- function getVariableStartToEndRegex() {
+ public function getVariableStartToEndRegex() {
if ( $this->mVariableStartToEndRegex == '' ) {
$this->initRegex();
}
@@ -624,14 +624,14 @@
*
* @return string
*/
- function getSynonym( $i ) {
+ public function getSynonym( $i ) {
return $this->mSynonyms[$i];
}
/**
* @return array
*/
- function getSynonyms() {
+ public function getSynonyms() {
return $this->mSynonyms;
}
@@ -641,7 +641,7 @@
*
* @return bool
*/
- function getWasModified() {
+ public function getWasModified() {
return $this->mModified;
}
@@ -658,7 +658,7 @@
*
* @return bool
*/
- function replaceMultiple( $magicarr, $subject, &$result ) {
+ public function replaceMultiple( $magicarr, $subject, &$result ) {
wfDeprecated( __METHOD__, '1.25' );
$search = [];
$replace = [];
@@ -679,7 +679,7 @@
* @param array $array
* @param string $value
*/
- function addToArray( &$array, $value ) {
+ public function addToArray( &$array, $value ) {
global $wgContLang;
foreach ( $this->mSynonyms as $syn ) {
$array[$wgContLang->lc( $syn )] = $value;
@@ -689,14 +689,14 @@
/**
* @return bool
*/
- function isCaseSensitive() {
+ public function isCaseSensitive() {
return $this->mCaseSensitive;
}
/**
* @return int
*/
- function getId() {
+ public function getId() {
return $this->mId;
}
}
--
To view, visit https://gerrit.wikimedia.org/r/274073
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I3588d9d2c17203ec3ff11736cd6ce84f687677a5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Addshore <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: Jackmcbarn <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits