Addshore has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/311706

Change subject: Add access modifiers to Cite.php (body)
......................................................................

Add access modifiers to Cite.php (body)

Change-Id: Ib1b4d1942237e8528e9b1fccb8e1524291fd57b2
---
M includes/Cite.php
1 file changed, 26 insertions(+), 26 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cite 
refs/changes/06/311706/1

diff --git a/includes/Cite.php b/includes/Cite.php
index 30535df..4e7f379 100644
--- a/includes/Cite.php
+++ b/includes/Cite.php
@@ -184,7 +184,7 @@
         * Did we install us into $wgHooks yet?
         * @var Boolean
         */
-       static protected $hooksInstalled = false;
+       protected static $hooksInstalled = false;
 
        /**#@+ @access private */
 
@@ -198,7 +198,7 @@
         *
         * @return string
         */
-       function ref( $str, array $argv, Parser $parser, PPFrame $frame ) {
+       public function ref( $str, array $argv, Parser $parser, PPFrame $frame 
) {
                if ( $this->mInCite ) {
                        return htmlspecialchars( "<ref>$str</ref>" );
                }
@@ -234,7 +234,7 @@
         * @throws Exception
         * @return string
         */
-       function guardedRef( $str, array $argv, Parser $parser, $default_group 
= self::DEFAULT_GROUP ) {
+       public function guardedRef( $str, array $argv, Parser $parser, 
$default_group = self::DEFAULT_GROUP ) {
                $this->mParser = $parser;
 
                # The key here is the "name" attribute.
@@ -379,7 +379,7 @@
         * @return mixed false on invalid input, a string on valid
         *               input and null on no input
         */
-       function refArg( array $argv ) {
+       public function refArg( array $argv ) {
                global $wgAllowCiteGroups;
                $cnt = count( $argv );
                $group = null;
@@ -441,7 +441,7 @@
         * @throws Exception
         * @return string
         */
-       function stack( $str, $key = null, $group, $follow, array $call ) {
+       public function stack( $str, $key = null, $group, $follow, array $call 
) {
                if ( !isset( $this->mRefs[$group] ) ) {
                        $this->mRefs[$group] = [];
                }
@@ -556,7 +556,7 @@
         * @param string $group
         * @param int $index
         */
-       function rollbackRef( $type, $key, $group, $index ) {
+       public function rollbackRef( $type, $key, $group, $index ) {
                if ( !isset( $this->mRefs[$group] ) ) {
                        return;
                }
@@ -611,7 +611,7 @@
         *
         * @return string
         */
-       function references( $str, array $argv, Parser $parser, PPFrame $frame 
) {
+       public function references( $str, array $argv, Parser $parser, PPFrame 
$frame ) {
                if ( $this->mInCite || $this->mInReferences ) {
                        if ( is_null( $str ) ) {
                                return htmlspecialchars( "<references/>" );
@@ -636,7 +636,7 @@
         *
         * @return string
         */
-       function guardedReferences( $str, array $argv, Parser $parser, $group = 
self::DEFAULT_GROUP ) {
+       public function guardedReferences( $str, array $argv, Parser $parser, 
$group = self::DEFAULT_GROUP ) {
                global $wgAllowCiteGroups;
 
                $this->mParser = $parser;
@@ -717,7 +717,7 @@
         *
         * @return string XHTML ready for output
         */
-       function referencesFormat( $group ) {
+       public function referencesFormat( $group ) {
                if ( !$this->mRefs || !isset( $this->mRefs[$group] ) ) {
                        return '';
                }
@@ -788,7 +788,7 @@
         *                   references, array for user-suppplied
         * @return string Wikitext
         */
-       function referencesFormatEntry( $key, $val ) {
+       public function referencesFormatEntry( $key, $val ) {
                // Anonymous reference
                if ( !is_array( $val ) ) {
                        return wfMessage(
@@ -863,7 +863,7 @@
         * @param String $text
         * @return String
         */
-       function referenceText( $key, $text ) {
+       public function referenceText( $key, $text ) {
                if ( !isset( $text ) || $text === '' ) {
                        if ( 
$this->mParser->getOptions()->getIsSectionPreview() ) {
                                return $this->warning( 
'cite_warning_sectionpreview_no_text', $key, 'noparse' );
@@ -885,7 +885,7 @@
         * @param int $max Maximum value expected.
         * @return string
         */
-       function referencesFormatEntryNumericBacklinkLabel( $base, $offset, 
$max ) {
+       public function referencesFormatEntryNumericBacklinkLabel( $base, 
$offset, $max ) {
                global $wgContLang;
                $scope = strlen( $max );
                $ret = $wgContLang->formatNum(
@@ -904,7 +904,7 @@
         *
         * @return string
         */
-       function referencesFormatEntryAlternateBacklinkLabel( $offset ) {
+       public function referencesFormatEntryAlternateBacklinkLabel( $offset ) {
                if ( !isset( $this->mBacklinkLabels ) ) {
                        $this->genBacklinkLabels();
                }
@@ -928,7 +928,7 @@
         *
         * @return string
         */
-       function getLinkLabel( $offset, $group, $label ) {
+       public function getLinkLabel( $offset, $group, $label ) {
                $message = "cite_link_label_group-$group";
                if ( !isset( $this->mLinkLabels[$group] ) ) {
                        $this->genLinkLabels( $group, $message );
@@ -957,7 +957,7 @@
         * @param int $num The number of the key
         * @return string A key for use in wikitext
         */
-       function refKey( $key, $num = null ) {
+       public function refKey( $key, $num = null ) {
                $prefix = wfMessage( 'cite_reference_link_prefix' 
)->inContentLanguage()->text();
                $suffix = wfMessage( 'cite_reference_link_suffix' 
)->inContentLanguage()->text();
                if ( isset( $num ) ) {
@@ -1000,7 +1000,7 @@
         *
         * @return string
         */
-       function linkRef( $group, $key, $count = null, $label = null, $subkey = 
'' ) {
+       public function linkRef( $group, $key, $count = null, $label = null, 
$subkey = '' ) {
                global $wgContLang;
                $label = is_null( $label ) ? ++$this->mGroupCnt[$group] : 
$label;
 
@@ -1028,7 +1028,7 @@
         * @param array $arr The array to format
         * @return string
         */
-       function listToText( $arr ) {
+       public function listToText( $arr ) {
                $cnt = count( $arr );
 
                $sep = wfMessage( 'cite_references_link_many_sep' 
)->inContentLanguage()->plain();
@@ -1048,7 +1048,7 @@
         * 'cite_references_link_many_format' message, the format is an
         * arbitrary number of tokens separated by [\t\n ]
         */
-       function genBacklinkLabels() {
+       public function genBacklinkLabels() {
                $text = wfMessage( 
'cite_references_link_many_format_backlink_labels' )
                        ->inContentLanguage()->plain();
                $this->mBacklinkLabels = preg_split( '#[\n\t ]#', $text );
@@ -1062,7 +1062,7 @@
         * @param string $group
         * @param string $message
         */
-       function genLinkLabels( $group, $message ) {
+       public function genLinkLabels( $group, $message ) {
                $text = false;
                $msg = wfMessage( $message )->inContentLanguage();
                if ( $msg->exists() ) {
@@ -1079,7 +1079,7 @@
         *
         * @return bool
         */
-       function clearState( Parser &$parser ) {
+       public function clearState( Parser &$parser ) {
                if ( $parser->extCite !== $this ) {
                        return $parser->extCite->clearState( $parser );
                }
@@ -1107,7 +1107,7 @@
         *
         * @return bool
         */
-       function cloneState( Parser $parser ) {
+       public function cloneState( Parser $parser ) {
                if ( $parser->extCite !== $this ) {
                        return $parser->extCite->cloneState( $parser );
                }
@@ -1138,7 +1138,7 @@
         *
         * @return bool
         */
-       function checkRefsNoReferences( $afterParse, &$parser, &$text ) {
+       public function checkRefsNoReferences( $afterParse, &$parser, &$text ) {
                if ( is_null( $parser->extCite ) ) {
                        return true;
                }
@@ -1233,7 +1233,7 @@
         *
         * @return bool
         */
-       function checkAnyCalls( &$output ) {
+       public function checkAnyCalls( &$output ) {
                global $wgParser;
                /* InlineEditor always uses $wgParser */
                return ( $wgParser->extCite->mCallCnt <= 0 );
@@ -1246,7 +1246,7 @@
         *
         * @return bool
         */
-       static function setHooks( Parser $parser ) {
+       public static function setHooks( Parser $parser ) {
                global $wgHooks;
 
                $parser->extCite = new self();
@@ -1273,7 +1273,7 @@
         * @param string $parse Whether to parse the message ('parse') or not 
('noparse')
         * @return string XHTML or wikitext ready for output
         */
-       function error( $key, $param = null, $parse = 'parse' ) {
+       public function error( $key, $param = null, $parse = 'parse' ) {
                # For ease of debugging and because errors are rare, we
                # use the user language and split the parser cache.
                $lang = $this->mParser->getOptions()->getUserLangObj();
@@ -1316,7 +1316,7 @@
         * @param string $parse Whether to parse the message ('parse') or not 
('noparse')
         * @return string XHTML or wikitext ready for output
         */
-       function warning( $key, $param = null, $parse = 'parse' ) {
+       public function warning( $key, $param = null, $parse = 'parse' ) {
                # For ease of debugging and because errors are rare, we
                # use the user language and split the parser cache.
                $lang = $this->mParser->getOptions()->getUserLangObj();

-- 
To view, visit https://gerrit.wikimedia.org/r/311706
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib1b4d1942237e8528e9b1fccb8e1524291fd57b2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Cite
Gerrit-Branch: master
Gerrit-Owner: Addshore <addshorew...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to