Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/89820
Change subject: Declare visibility on class properties ...................................................................... Declare visibility on class properties Also compress some variable documentation. Change-Id: I47d31e18df18492373aa407ea19f1a81b2cf5d57 --- M AbuseFilter.class.php M AbuseFilter.parser.php M AbuseFilterVariableHolder.php M Views/AbuseFilterViewDiff.php 4 files changed, 19 insertions(+), 30 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter refs/changes/20/89820/1 diff --git a/AbuseFilter.class.php b/AbuseFilter.class.php index a585c00..db14a63 100644 --- a/AbuseFilter.class.php +++ b/AbuseFilter.class.php @@ -340,9 +340,7 @@ public static function checkSyntax( $filter ) { global $wgAbuseFilterParserClass; - /** - * @var $parser AbuseFilterParser - */ + /** @var $parser AbuseFilterParser */ $parser = new $wgAbuseFilterParserClass; return $parser->checkSyntax( $filter ); @@ -360,9 +358,7 @@ return 'BADSYNTAX'; } - /** - * @var $parser AbuseFilterParser - */ + /** @var $parser AbuseFilterParser */ $parser = new $wgAbuseFilterParserClass( $vars ); return $parser->evaluateExpression( $expr ); @@ -386,9 +382,7 @@ wfProfileIn( __METHOD__ ); if ( is_null( $parser ) || $keepVars == 'resetvars' ) { - /** - * @var $parser AbuseFilterParser - */ + /** @var $parser AbuseFilterParser */ $parser = new $wgAbuseFilterParserClass( $vars ); } @@ -2150,9 +2144,7 @@ * @return String */ static function formatAction( $action, $parameters ) { - /* - * @var $wgLang Language - */ + /** @var $wgLang Language */ global $wgLang; if ( count( $parameters ) == 0 ) { $displayAction = AbuseFilter::getActionDisplay( $action ); @@ -2169,9 +2161,7 @@ * @return string */ static function formatFlags( $value ) { - /* - * @var $wgLang Language - */ + /** @var $wgLang Language */ global $wgLang; $flags = array_filter( explode( ',', $value ) ); $flags_display = array(); diff --git a/AbuseFilter.parser.php b/AbuseFilter.parser.php index d36b634..86582b9 100644 --- a/AbuseFilter.parser.php +++ b/AbuseFilter.parser.php @@ -49,9 +49,9 @@ const TComma = 'T_COMMA'; const TStatementSeparator = 'T_STATEMENT_SEPARATOR'; - var $type; - var $value; - var $pos; + public $type; + public $value; + public $pos; public function __construct( $type = self::TNone, $value = null, $pos = 0 ) { $this->type = $type; @@ -69,8 +69,8 @@ const DFloat = 'float'; const DList = 'list'; - var $type; - var $data; + public $type; + public $data; /** * @param string $type @@ -499,7 +499,7 @@ } class AFPParserState { - var $pos, $token, $lastInput; + public $pos, $token, $lastInput; public function __construct( $token, $pos ) { $this->token = $token; @@ -576,12 +576,12 @@ } class AbuseFilterParser { - var $mParams, $mCode, $mTokens, $mPos, $mCur, $mShortCircuit, $mAllowShort, $mLen; + public $mParams, $mCode, $mTokens, $mPos, $mCur, $mShortCircuit, $mAllowShort, $mLen; /** * @var AbuseFilterVariableHolder */ - var $mVars; + public $mVars; // length,lcase,ucase,ccnorm,rmdoubles,specialratio,rmspecials,norm,count static $mFunctions = array( diff --git a/AbuseFilterVariableHolder.php b/AbuseFilterVariableHolder.php index 10699de..96aa288 100644 --- a/AbuseFilterVariableHolder.php +++ b/AbuseFilterVariableHolder.php @@ -1,7 +1,6 @@ <?php class AbuseFilterVariableHolder { - - var $mVars = array(); + public $mVars = array(); static $varBlacklist = array( 'context' ); @@ -191,7 +190,7 @@ } class AFComputedVariable { - var $mMethod, $mParameters; + public $mMethod, $mParameters; static $userCache = array(); static $articleCache = array(); diff --git a/Views/AbuseFilterViewDiff.php b/Views/AbuseFilterViewDiff.php index 58ec329..1472f22 100644 --- a/Views/AbuseFilterViewDiff.php +++ b/Views/AbuseFilterViewDiff.php @@ -36,10 +36,10 @@ } class AbuseFilterViewDiff extends AbuseFilterView { - var $mOldVersion = null; - var $mNewVersion = null; - var $mNextHistoryId = null; - var $mFilter = null; + public $mOldVersion = null; + public $mNewVersion = null; + public $mNextHistoryId = null; + public $mFilter = null; function show() { $show = $this->loadData(); -- To view, visit https://gerrit.wikimedia.org/r/89820 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I47d31e18df18492373aa407ea19f1a81b2cf5d57 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/AbuseFilter Gerrit-Branch: master Gerrit-Owner: Siebrand <siebr...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits