Jeroen De Dauw has submitted this change and it was merged.

Change subject: Use private scope where possible in client
......................................................................


Use private scope where possible in client

Change-Id: Id40bf9c49f782a374d329fd3d43500417571b33e
---
M client/includes/ChangeHandler.php
M client/includes/ClientSiteLinkLookup.php
M client/includes/EntityIdPropertyUpdater.php
M client/includes/InterwikiSorter.php
M client/includes/LangLinkHandler.php
M client/includes/NamespaceChecker.php
M client/includes/RepoItemLinkGenerator.php
M client/includes/RepoLinker.php
M client/includes/SiteLinkCommentCreator.php
M client/includes/UpdateRepo.php
M client/includes/UpdateRepoOnMove.php
M client/includes/WikibaseClient.php
M client/includes/api/ApiClientInfo.php
M client/includes/hooks/InfoActionHookHandler.php
M client/includes/hooks/MovePageNotice.php
M client/includes/parserhooks/ParserErrorMessageFormatter.php
M client/includes/parserhooks/PropertyParserFunction.php
M client/includes/parserhooks/PropertyParserFunctionRenderer.php
M client/includes/recentchanges/ChangeLineFormatter.php
M client/includes/recentchanges/ExternalChange.php
M client/includes/recentchanges/ExternalChangeFactory.php
M client/includes/recentchanges/ExternalRecentChange.php
M client/includes/recentchanges/RecentChangesFilterOptions.php
M client/includes/scribunto/Scribunto_LuaWikibaseEntityLibrary.php
M client/includes/scribunto/Scribunto_LuaWikibaseLibrary.php
M client/includes/scribunto/WikibaseLuaBindings.php
M client/includes/scribunto/WikibaseLuaEntityBindings.php
M client/includes/specials/SpecialUnconnectedPages.php
28 files changed, 135 insertions(+), 160 deletions(-)

Approvals:
  WikidataJenkins: Verified
  Jeroen De Dauw: Looks good to me, approved
  jenkins-bot: Checked

Objections:
  Hoo man: There's a problem with this change, please improve



diff --git a/client/includes/ChangeHandler.php 
b/client/includes/ChangeHandler.php
index da718d0..f12c541 100644
--- a/client/includes/ChangeHandler.php
+++ b/client/includes/ChangeHandler.php
@@ -70,33 +70,33 @@
        /**
         * @var PageUpdater $updater
         */
-       protected $updater;
+       private $updater;
 
 
        /**
         * @var EntityLookup $entityLookup
         */
-       protected $entityLookup;
+       private $entityLookup;
 
        /**
         * @var Site $site
         */
-       protected $site;
+       private $site;
 
        /**
         * @var string
         */
-       protected $siteId;
+       private $siteId;
 
        /**
         * @var NamespaceChecker $namespaceChecker
         */
-       protected $namespaceChecker;
+       private $namespaceChecker;
 
        /**
         * @var bool
         */
-       protected $checkPageExistence = true;
+       private $checkPageExistence = true;
 
        public function __construct( PageUpdater $updater = null,
                        EntityLookup $entityLookup = null,
@@ -611,7 +611,7 @@
         *
         * @return string
         */
-       protected static function getChangeIdForLog( Change $change ) {
+       private static function getChangeIdForLog( Change $change ) {
                $fields = $change->getFields(); //@todo: add getFields() to the 
interface, or provide getters!
 
                if ( isset( $fields['info']['change-ids'] ) ) {
@@ -633,7 +633,7 @@
         * @return array|boolean an array of RC attributes,
         *         or false if the change does not provide edit meta data
         */
-       protected function getRCAttributes( EntityChange $change ) {
+       private function getRCAttributes( EntityChange $change ) {
                wfProfileIn( __METHOD__ );
 
                $rcinfo = $change->getMetadata();
diff --git a/client/includes/ClientSiteLinkLookup.php 
b/client/includes/ClientSiteLinkLookup.php
index e7486cc..ce07858 100644
--- a/client/includes/ClientSiteLinkLookup.php
+++ b/client/includes/ClientSiteLinkLookup.php
@@ -19,17 +19,17 @@
        /**
         * @var string
         */
-       protected $localSiteId;
+       private $localSiteId;
 
        /**
         * @var SiteLinkLookup
         */
-       protected $siteLinkLookup;
+       private $siteLinkLookup;
 
        /**
         * @var EntityLookup
         */
-       protected $entityLookup;
+       private $entityLookup;
 
        /**
         * @param string $localSiteId global id of the client wiki
diff --git a/client/includes/EntityIdPropertyUpdater.php 
b/client/includes/EntityIdPropertyUpdater.php
index e4415e2..13d38db 100644
--- a/client/includes/EntityIdPropertyUpdater.php
+++ b/client/includes/EntityIdPropertyUpdater.php
@@ -18,10 +18,10 @@
 class EntityIdPropertyUpdater {
 
        /* @var SiteLinkLookup */
-       protected $siteLinkLookup;
+       private $siteLinkLookup;
 
        /* @var string */
-       protected $siteId;
+       private $siteId;
 
        /**
         * @since 0.4
@@ -73,7 +73,7 @@
         * @param ParserOutput $out
         * @param string $propertyName
         */
-       protected function unsetProperty( \ParserOutput $out, $propertyName ) {
+       private function unsetProperty( \ParserOutput $out, $propertyName ) {
                // unset property, if it was set
                $properties = $out->getProperties();
 
diff --git a/client/includes/InterwikiSorter.php 
b/client/includes/InterwikiSorter.php
index e2e5234..829981d 100644
--- a/client/includes/InterwikiSorter.php
+++ b/client/includes/InterwikiSorter.php
@@ -13,13 +13,13 @@
  */
 class InterwikiSorter {
 
-       protected $sortOrders;
+       private $sortOrders;
 
-       protected $sort;
+       private $sort;
 
-       protected $sortPrepend;
+       private $sortPrepend;
 
-       protected $sortOrder;
+       private $sortOrder;
 
        /**
         * @since 0.4
@@ -73,14 +73,12 @@
        /**
         * usort() callback function, compares the links on the basis of 
$sortOrder
         *
-        * @since 0.1
-        *
         * @param mixed $a
         * @param mixed $b
         *
         * @return integer
         */
-       protected function compareLinks( $a, $b ) {
+       private function compareLinks( $a, $b ) {
                $a = $a[0];
                $b = $b[0];
 
@@ -96,8 +94,6 @@
        /**
         * Build sort order to be used by compareLinks().
         *
-        * @since 0.1
-        *
         * @param string $sort
         * @param array $sortOrders []
         * @param array $sortPrepend []
@@ -105,7 +101,7 @@
         * @throws \MWException
         * @return array
         */
-       protected function buildSortOrder( $sort, array $sortOrders, array 
$sortPrepend ) {
+       private function buildSortOrder( $sort, array $sortOrders, array 
$sortPrepend ) {
                if ( !array_key_exists( 'alphabetic', $sortOrders ) ) {
                        throw new \MWException( 'alphabetic interwiki sorting 
order is missing from Wikibase Client settings.' );
                }
diff --git a/client/includes/LangLinkHandler.php 
b/client/includes/LangLinkHandler.php
index 7dd5c2a..9709bfc 100644
--- a/client/includes/LangLinkHandler.php
+++ b/client/includes/LangLinkHandler.php
@@ -23,27 +23,27 @@
        /**
         * @var string
         */
-       protected $siteId;
+       private $siteId;
 
        /**
         * @var array
         */
-       protected $namespaces;
+       private $namespaces;
 
        /**
         * @var array
         */
-       protected $excludeNamespaces;
+       private $excludeNamespaces;
 
        /**
         * @var SiteLinkLookup
         */
-       protected $siteLinkLookup;
+       private $siteLinkLookup;
 
        /**
         * @var SiteStore
         */
-       protected $sites;
+       private $sites;
 
        /**
         * @var string
@@ -268,14 +268,12 @@
         * Converts a list of interwiki links into an associative array that 
maps
         * global site IDs to the respective target pages on the designated 
wikis.
         *
-        * @since 0.4
-        *
         * @param array $flatLinks
         *
         * @return array An associative array, using site IDs for keys
         *           and the target pages on the respective wiki as the 
associated value.
         */
-       protected function localLinksToArray( array $flatLinks ) {
+       private function localLinksToArray( array $flatLinks ) {
                wfProfileIn( __METHOD__ );
 
                $links = array();
@@ -307,14 +305,12 @@
         * Converts a list of SiteLink objects into an associative array that 
maps
         * global site IDs to the respective target pages on the designated 
wikis.
         *
-        * @since 0.4
-        *
         * @param SimpleSiteLink[] $repoLinks
         *
         * @return array An associative array, using site IDs for keys
         *         and the target pages on the respective wiki as the 
associated value.
         */
-       protected function repoLinksToArray( array $repoLinks ) {
+       private function repoLinksToArray( array $repoLinks ) {
                wfProfileIn( __METHOD__ );
 
                $links = array();
diff --git a/client/includes/NamespaceChecker.php 
b/client/includes/NamespaceChecker.php
index 7d91a67..7d1718a 100644
--- a/client/includes/NamespaceChecker.php
+++ b/client/includes/NamespaceChecker.php
@@ -19,12 +19,12 @@
        /**
         * @var array
         */
-       protected $excludedNamespaces;
+       private $excludedNamespaces;
 
        /**
         * @var array
         */
-       protected $enabledNamespaces;
+       private $enabledNamespaces;
 
        /**
         * @since 0.4
@@ -64,13 +64,11 @@
         * Check if the namespace is excluded by settings for having wikibase 
links, etc.
         * based on the 'excludeNamespaces' setting.
         *
-        * @since 0.4
-        *
         * @param int $namespace
         *
         * @return bool
         */
-       protected function isExcluded( $namespace ) {
+       private function isExcluded( $namespace ) {
                return in_array( $namespace, $this->excludedNamespaces );
        }
 
@@ -80,13 +78,11 @@
         * Note: If no list of enabled namespaces is configured, all namespaces 
are considered
         * to be enabled for Wikibase.
         *
-        * @since 0.4
-        *
         * @param int $namespace
         *
         * @return bool
         */
-       protected function isEnabled( $namespace ) {
+       private function isEnabled( $namespace ) {
                return empty( $this->enabledNamespaces )
                        || in_array( $namespace, $this->enabledNamespaces );
        }
diff --git a/client/includes/RepoItemLinkGenerator.php 
b/client/includes/RepoItemLinkGenerator.php
index 87ac45f..ef51d07 100644
--- a/client/includes/RepoItemLinkGenerator.php
+++ b/client/includes/RepoItemLinkGenerator.php
@@ -13,13 +13,13 @@
  */
 class RepoItemLinkGenerator {
 
-       protected $namespacesChecker;
+       private $namespacesChecker;
 
-       protected $repoLinker;
+       private $repoLinker;
 
-       protected $entityIdParser;
+       private $entityIdParser;
 
-       protected $siteGroup;
+       private $siteGroup;
 
        /**
         * @since 0.4
@@ -69,15 +69,13 @@
        }
 
        /**
-        * @since 0.4
-        *
         * @param Title $title
         * @param string $action
         * @param mixed $noExternalLangLinks
         *
         * @return boolean
         */
-       protected function canHaveLink( Title $title, $action, 
$noExternalLangLinks ) {
+       private function canHaveLink( Title $title, $action, 
$noExternalLangLinks ) {
                if ( $action !== 'view' ) {
                        return false;
                }
@@ -93,13 +91,11 @@
        }
 
        /**
-        * @since 0.4
-        *
         * @param mixed
         *
         * @return boolean
         */
-       protected function isSuppressed( $noExternalLangLinks ) {
+       private function isSuppressed( $noExternalLangLinks ) {
                if ( $noExternalLangLinks === null || !in_array( '*', 
$noExternalLangLinks ) ) {
                        return false;
                }
@@ -108,13 +104,11 @@
        }
 
        /**
-        * @since 0.4
-        *
         * @param EntityId
         *
         * @return array
         */
-       protected function getEditLinksLink( EntityId $entityId ) {
+       private function getEditLinksLink( EntityId $entityId ) {
                $fragment = '#sitelinks-' . htmlspecialchars( $this->siteGroup, 
ENT_QUOTES );
 
                $link = array(
@@ -131,11 +125,9 @@
        /**
         * Used by the LinkItem js widget
         *
-        * @since 0.4
-        *
         * @return array
         */
-       protected function getAddLinksLink() {
+       private function getAddLinksLink() {
                $link = array(
                        'action' => 'add',
                        'text' => '',
diff --git a/client/includes/RepoLinker.php b/client/includes/RepoLinker.php
index 5f4ed31..4441985 100644
--- a/client/includes/RepoLinker.php
+++ b/client/includes/RepoLinker.php
@@ -13,13 +13,13 @@
  */
 class RepoLinker {
 
-       protected $baseUrl;
+       private $baseUrl;
 
-       protected $articlePath;
+       private $articlePath;
 
-       protected $scriptPath;
+       private $scriptPath;
 
-       protected $namespaces;
+       private $namespaces;
 
        /**
         * @since 0.4
@@ -87,13 +87,11 @@
        /**
         * Encode a page title
         *
-        * @since 0.4
-        *
         * @param string $page
         *
         * @return string
         */
-       protected function encodePage( $page ) {
+       private function encodePage( $page ) {
                return wfUrlencode( str_replace( ' ', '_', $page ) );
        }
 
diff --git a/client/includes/SiteLinkCommentCreator.php 
b/client/includes/SiteLinkCommentCreator.php
index 8dfca7d..853d7ca 100644
--- a/client/includes/SiteLinkCommentCreator.php
+++ b/client/includes/SiteLinkCommentCreator.php
@@ -19,7 +19,7 @@
        /**
         * @var string
         */
-       protected $siteId;
+       private $siteId;
 
        /**
         * @param string $siteId
@@ -61,7 +61,7 @@
         *
         * @return array|null
         */
-       protected function getSiteLinkComment( $action, Diff $siteLinkDiff ) {
+       private function getSiteLinkComment( $action, Diff $siteLinkDiff ) {
                if ( $siteLinkDiff->isEmpty() ) {
                        return null;
                }
@@ -109,7 +109,7 @@
         *
         * @return array|null
         */
-       protected function getSiteLinkChangeParams( array $diffs ) {
+       private function getSiteLinkChangeParams( array $diffs ) {
                $messagePrefix = 'wikibase-comment-sitelink-';
                /* Messages used:
                        wikibase-comment-sitelink-add 
wikibase-comment-sitelink-change wikibase-comment-sitelink-remove
@@ -144,7 +144,7 @@
         *
         * @return array|null
         */
-       protected function getChangeParamsForDiffOp( DiffOp $diffOp, $siteId, 
$messagePrefix ) {
+       private function getChangeParamsForDiffOp( DiffOp $diffOp, $siteId, 
$messagePrefix ) {
                $params = array();
 
                if ( $diffOp instanceof \Diff\DiffOpAdd ) {
@@ -189,7 +189,7 @@
         *
         * @return array|null
         */
-       protected function getSiteLinkAddRemoveParams( DiffOp $diffOp, $action, 
$siteId ) {
+       private function getSiteLinkAddRemoveParams( DiffOp $diffOp, $action, 
$siteId ) {
                $params = array();
 
                if ( in_array( $action, array( 'remove', 'restore' ) ) ) {
diff --git a/client/includes/UpdateRepo.php b/client/includes/UpdateRepo.php
index d889ddc..ef87113 100644
--- a/client/includes/UpdateRepo.php
+++ b/client/includes/UpdateRepo.php
@@ -25,9 +25,10 @@
        /**
         * @var string
         */
-       protected $repoDB;
+       private $repoDB;
 
        /**
+        * @since 0.4
         * @var User
         */
        protected $user;
@@ -35,14 +36,16 @@
        /**
         * @var SiteLinkLookup
         */
-       protected $siteLinkLookup;
+       private $siteLinkLookup;
 
        /**
+        * @since 0.4
         * @var string
         */
        protected $siteId;
 
        /**
+        * @since 0.4
         * @var Title
         */
        protected $title;
diff --git a/client/includes/UpdateRepoOnMove.php 
b/client/includes/UpdateRepoOnMove.php
index a13e429..d0c0d99 100644
--- a/client/includes/UpdateRepoOnMove.php
+++ b/client/includes/UpdateRepoOnMove.php
@@ -17,7 +17,7 @@
        /**
         * @var Title
         */
-       protected $newTitle;
+       private $newTitle;
 
        /**
         * @param string $repoDB Database name of the repo
diff --git a/client/includes/WikibaseClient.php 
b/client/includes/WikibaseClient.php
index 04e9884..6471427 100644
--- a/client/includes/WikibaseClient.php
+++ b/client/includes/WikibaseClient.php
@@ -53,28 +53,24 @@
        public $propertyDataTypeLookup;
 
        /**
-        * @since 0.4
-        *
         * @var SettingsArray
         */
-       protected $settings;
+       private $settings;
 
        /**
-        * @since 0.4
-        *
         * @var Language
         */
-       protected $contentLanguage;
+       private $contentLanguage;
 
        /**
         * @var DataTypeFactory
         */
-       protected $dataTypeFactory = null;
+       private $dataTypeFactory = null;
 
        /**
         * @var LanguageFallbackChainFactory
         */
-       protected $languageFallbackChainFactory = null;
+       private $languageFallbackChainFactory = null;
 
        /**
         * @var ClientStore[]
@@ -353,11 +349,9 @@
         * Returns a new instance constructed from global settings.
         * IMPORTANT: Use only when it is not feasible to inject an instance 
properly.
         *
-        * @since 0.4
-        *
         * @return WikibaseClient
         */
-       protected static function newInstance() {
+       private static function newInstance() {
                global $wgContLang;
 
                return new self( Settings::singleton(), $wgContLang );
@@ -443,7 +437,7 @@
         *
         * @return string
         */
-       protected function newSiteGroup() {
+       private function newSiteGroup() {
                $siteGroup = $this->settings->getSetting( 'siteGroup' );
 
                if ( !$siteGroup ) {
@@ -495,7 +489,7 @@
        /**
         * @return OutputFormatSnakFormatterFactory
         */
-       protected function newSnakFormatterFactory() {
+       private function newSnakFormatterFactory() {
                $valueFormatterBuilders = new WikibaseValueFormatterBuilders(
                        $this->getEntityLookup(),
                        $this->contentLanguage
@@ -527,7 +521,7 @@
        /**
         * @return OutputFormatValueFormatterFactory
         */
-       protected function newValueFormatterFactory() {
+       private function newValueFormatterFactory() {
                $builders = new WikibaseValueFormatterBuilders(
                        $this->getEntityLookup(),
                        $this->contentLanguage
diff --git a/client/includes/api/ApiClientInfo.php 
b/client/includes/api/ApiClientInfo.php
index 0a24dc4..67d3be0 100644
--- a/client/includes/api/ApiClientInfo.php
+++ b/client/includes/api/ApiClientInfo.php
@@ -20,7 +20,7 @@
        /**
         * @var SettingsArray
         */
-       protected $settings;
+       private $settings;
 
        /**
         * @since 0.4
diff --git a/client/includes/hooks/InfoActionHookHandler.php 
b/client/includes/hooks/InfoActionHookHandler.php
index 52bf999..e6f2e1b 100644
--- a/client/includes/hooks/InfoActionHookHandler.php
+++ b/client/includes/hooks/InfoActionHookHandler.php
@@ -21,22 +21,22 @@
        /**
         * @var NamespaceChecker
         */
-       protected $namespaceChecker;
+       private $namespaceChecker;
 
        /**
         * @var RepoLinker
         */
-       protected $repoLinker;
+       private $repoLinker;
 
        /**
         * @var SiteLinkLookup
         */
-       protected $siteLinkLookup;
+       private $siteLinkLookup;
 
        /**
         * @var string
         */
-       protected $siteId;
+       private $siteId;
 
        public function __construct( NamespaceChecker $namespaceChecker, 
RepoLinker $repoLinker,
                SiteLinkLookup $siteLinkLookup, $siteId ) {
diff --git a/client/includes/hooks/MovePageNotice.php 
b/client/includes/hooks/MovePageNotice.php
index 182eae2..41ae48c 100644
--- a/client/includes/hooks/MovePageNotice.php
+++ b/client/includes/hooks/MovePageNotice.php
@@ -23,17 +23,17 @@
        /**
         * @var SiteLinkLookup
         */
-       protected $siteLinkLookup;
+       private $siteLinkLookup;
 
        /**
         * @var string
         */
-       protected $siteId;
+       private $siteId;
 
        /**
         * @var RepoLinker
         */
-       protected $repoLinker;
+       private $repoLinker;
 
        /**
         * @param SiteLinkLookup $siteLinkLookup
@@ -54,7 +54,7 @@
         *
         * @return string|null
         */
-       protected function getItemUrl( Title $title ) {
+       private function getItemUrl( Title $title ) {
                $entityId = $this->siteLinkLookup->getEntityIdForSiteLink(
                        new SimpleSiteLink(
                                $this->siteId,
@@ -98,7 +98,7 @@
                return $html;
        }
 
-       protected function getPageMoveMessage( Title $newTitle ) {
+       private function getPageMoveMessage( Title $newTitle ) {
                if ( isset( $newTitle->wikibasePushedMoveToRepo ) ) {
                        // We're going to update the item using the repo job 
queue \o/
                        return 'wikibase-after-page-move-queued';
diff --git a/client/includes/parserhooks/ParserErrorMessageFormatter.php 
b/client/includes/parserhooks/ParserErrorMessageFormatter.php
index e758b8d..29320ea 100644
--- a/client/includes/parserhooks/ParserErrorMessageFormatter.php
+++ b/client/includes/parserhooks/ParserErrorMessageFormatter.php
@@ -18,7 +18,7 @@
 class ParserErrorMessageFormatter {
 
        /* @var Language $language */
-       protected $language;
+       private $language;
 
        /**
         * @since 0.4
diff --git a/client/includes/parserhooks/PropertyParserFunction.php 
b/client/includes/parserhooks/PropertyParserFunction.php
index 14676f5..79b4c12 100644
--- a/client/includes/parserhooks/PropertyParserFunction.php
+++ b/client/includes/parserhooks/PropertyParserFunction.php
@@ -28,22 +28,22 @@
        /**
         * @var Parser
         */
-       protected $parser;
+       private $parser;
 
        /**
         * @var EntityId
         */
-       protected $entityId;
+       private $entityId;
 
        /**
         * @var EntityLookup
         */
-       protected $entityLookup;
+       private $entityLookup;
 
        /**
         * @var PropertyLabelResolver
         */
-       protected $propertyLabelResolver;
+       private $propertyLabelResolver;
 
        /**
         * @param Parser $parser
diff --git a/client/includes/parserhooks/PropertyParserFunctionRenderer.php 
b/client/includes/parserhooks/PropertyParserFunctionRenderer.php
index 6138a0c..f6695cc 100644
--- a/client/includes/parserhooks/PropertyParserFunctionRenderer.php
+++ b/client/includes/parserhooks/PropertyParserFunctionRenderer.php
@@ -25,19 +25,19 @@
 class PropertyParserFunctionRenderer {
 
        /* @var Language */
-       protected $language;
+       private $language;
 
        /* @var EntityLookup */
-       protected $entityLookup;
+       private $entityLookup;
 
        /* @var PropertyLabelResolver */
-       protected $propertyLabelResolver;
+       private $propertyLabelResolver;
 
        /* @var ParserErrorMessageFormatter */
-       protected $errorFormatter;
+       private $errorFormatter;
 
        /* @var SnakFormatter */
-       protected $snaksFormatter;
+       private $snaksFormatter;
 
        /**
         * @param Language                   $language
diff --git a/client/includes/recentchanges/ChangeLineFormatter.php 
b/client/includes/recentchanges/ChangeLineFormatter.php
index 5c49e66..20b80b1 100644
--- a/client/includes/recentchanges/ChangeLineFormatter.php
+++ b/client/includes/recentchanges/ChangeLineFormatter.php
@@ -21,17 +21,17 @@
        /**
         * @var User
         */
-       protected $user;
+       private $user;
 
        /**
         * @var Language
         */
-       protected $lang;
+       private $lang;
 
        /**
         * @var RepoLinker
         */
-       protected $repoLinker;
+       private $repoLinker;
 
        /**
         * @param User $user
@@ -79,7 +79,7 @@
        /**
         * @return string
         */
-       protected function changeSeparator() {
+       private function changeSeparator() {
                return ' <span class="mw-changeslist-separator">. .</span> ';
        }
 
@@ -88,7 +88,7 @@
         *
         * @return string
         */
-       protected function formatTimestamp( $timestamp ) {
+       private function formatTimestamp( $timestamp ) {
                return wfMessage( 'semicolon-separator' )->text()
                        . '<span class="mw-changeslist-date">'
                        . $this->lang->userTime( $timestamp, $this->user )
@@ -100,7 +100,7 @@
         *
         * @return string
         */
-       protected function formatUserLinks( $userName ) {
+       private function formatUserLinks( $userName ) {
                $links = $this->buildUserLinks( $userName );
 
                if ( User::isIP( $userName ) ) {
@@ -117,7 +117,7 @@
         *
         * @return string
         */
-       protected function formatIpUserLinks( array $links ) {
+       private function formatIpUserLinks( array $links ) {
                $userlinks = $links['contribs'];
 
                $userlinks .= wfMessage( 'word-separator' )->plain()
@@ -135,7 +135,7 @@
         *
         * @return string
         */
-       protected function formatRegisteredUserLinks( array $links ) {
+       private function formatRegisteredUserLinks( array $links ) {
                $userlinks = $links['user'];
 
                $usertools = array(
@@ -158,7 +158,7 @@
         *
         * @return string
         */
-       protected function formatEntityLink( $entityId ) {
+       private function formatEntityLink( $entityId ) {
                $entityLink = $this->repoLinker->buildEntityLink( $entityId );
 
                return wfMessage( 'word-separator' )->plain()
@@ -168,7 +168,7 @@
        /**
         * @return string
         */
-       protected function formatDeletionLogLink() {
+       private function formatDeletionLogLink() {
                $logLink = $this->repoLinker->formatLink(
                        $this->repoLinker->getPageUrl( 'Special:Log/delete' ),
                        wfMessage( 'dellogpage' )->text()
@@ -184,7 +184,7 @@
         *
         * @return string
         */
-       protected function formatDiffHist( EntityId $entityId, RevisionData 
$rev, $count ) {
+       private function formatDiffHist( EntityId $entityId, RevisionData $rev, 
$count ) {
                $diffLink = $this->buildDiffLink( $entityId, $rev, $count );
                $historyLink = $this->buildHistoryLink( $entityId, $rev );
 
@@ -200,7 +200,7 @@
         *
         * @return string
         */
-       protected function buildDiffLink( EntityId $entityId, RevisionData 
$rev, $count ) {
+       private function buildDiffLink( EntityId $entityId, RevisionData $rev, 
$count ) {
                $params = array(
                        'title' => $this->repoLinker->getEntityTitle( $entityId 
),
                        'curid' => $rev->getPageId(),
@@ -226,7 +226,7 @@
         *
         * @return string
         */
-       protected function buildHistoryLink( EntityId $entityId, RevisionData 
$rev ) {
+       private function buildHistoryLink( EntityId $entityId, RevisionData 
$rev ) {
                $titleText = $this->repoLinker->getEntityTitle( $entityId );
 
                $params = array(
@@ -251,7 +251,7 @@
         *
         * @return string
         */
-       protected function buildUserLink( $userName ) {
+       private function buildUserLink( $userName ) {
                return $this->repoLinker->formatLink(
                        // @todo: localise this once namespaces are localised 
on the repo
                        $this->repoLinker->getPageUrl( "User:$userName" ),
@@ -268,7 +268,7 @@
         *
         * @return string
         */
-       protected function buildUserContribsLink( $userName, $text = null ) {
+       private function buildUserContribsLink( $userName, $text = null ) {
                // @todo: know how the repo is localised. it's english now
                // for namespaces and special pages
                $link = $this->repoLinker->getPageUrl( 
"Special:Contributions/$userName" );
@@ -285,7 +285,7 @@
         *
         * @return string
         */
-       protected function buildUserTalkLink( $userName ) {
+       private function buildUserTalkLink( $userName ) {
                // @todo: localize this once we can localize namespaces on the 
repo
                $link = $this->repoLinker->getPageUrl( "User_talk:$userName" );
                $text = wfMessage( 'talkpagelinktext' )->text();
@@ -300,7 +300,7 @@
         *
         * @return string[]
         */
-       protected function buildUserLinks( $userName ) {
+       private function buildUserLinks( $userName ) {
                $links = array();
 
                $links['usertalk'] = $this->buildUserTalkLink( $userName );
@@ -320,7 +320,7 @@
         *
         * @return string
         */
-       protected function formatComment( array $comment ) {
+       private function formatComment( array $comment ) {
                $commentMsg = wfMessage( $comment['key'] );
 
                if ( isset( $comment['numparams'] ) ) {
diff --git a/client/includes/recentchanges/ExternalChange.php 
b/client/includes/recentchanges/ExternalChange.php
index 54902f1..1cf1063 100644
--- a/client/includes/recentchanges/ExternalChange.php
+++ b/client/includes/recentchanges/ExternalChange.php
@@ -15,17 +15,17 @@
        /**
         * @var EntityId
         */
-       protected $entityId;
+       private $entityId;
 
        /**
         * @var RevisionData
         */
-       protected $rev;
+       private $rev;
 
        /**
         * @var string
         */
-       protected $changeType;
+       private $changeType;
 
        /**
         * @param EntityId $entityId
diff --git a/client/includes/recentchanges/ExternalChangeFactory.php 
b/client/includes/recentchanges/ExternalChangeFactory.php
index 12d514c..57a7736 100644
--- a/client/includes/recentchanges/ExternalChangeFactory.php
+++ b/client/includes/recentchanges/ExternalChangeFactory.php
@@ -18,7 +18,7 @@
        /**
         * @var string
         */
-       protected $repoSiteId;
+       private $repoSiteId;
 
        /**
         * @param string $repoSiteId
@@ -51,7 +51,7 @@
         *
         * @return RevisionData
         */
-       protected function newRevisionData( RecentChange $recentChange, array 
$changeParams ) {
+       private function newRevisionData( RecentChange $recentChange, array 
$changeParams ) {
                $repoId = isset( $changeParams['site_id'] )
                        ? $changeParams['site_id'] : $this->repoSiteId;
 
@@ -72,7 +72,7 @@
         * @return array
         * @throws UnexpectedValueException
         */
-       protected function extractChangeData( RecentChange $recentChange ) {
+       private function extractChangeData( RecentChange $recentChange ) {
                $params = unserialize( $recentChange->getAttribute( 'rc_params' 
) );
 
                if ( !is_array( $params ) || !array_key_exists( 
'wikibase-repo-change', $params ) ) {
@@ -93,7 +93,7 @@
         *
         * @return boolean
         */
-       protected function validateChangeData( $changeParams ) {
+       private function validateChangeData( $changeParams ) {
                if ( ! is_array( $changeParams ) ) {
                        throw new UnexpectedValueException( 'Invalid Wikibase 
change' );
                }
@@ -115,7 +115,7 @@
         * @return string
         * @throws UnexpectedValueException
         */
-       protected function extractChangeType( $type ) {
+       private function extractChangeType( $type ) {
                if ( !is_string( $type ) ) {
                        throw new UnexpectedValueException( '$type must be a 
string.' );
                }
@@ -138,7 +138,7 @@
         * @return ItemId
         * @throws UnexpectedValueException
         */
-       protected function extractItemId( $prefixedId ) {
+       private function extractItemId( $prefixedId ) {
                try {
                        return new ItemId( $prefixedId );
                } catch ( InvalidArgumentException $ex ) {
@@ -154,7 +154,7 @@
         *
         * @return string
         */
-       protected function parseComment( $comment, $type ) {
+       private function parseComment( $comment, $type ) {
                $newComment = array(
                        'key' => 'wikibase-comment-update'
                );
@@ -183,7 +183,7 @@
         *
         * @return string
         */
-       protected function extractComment( $changeParams ) {
+       private function extractComment( $changeParams ) {
                $comment = array(
                        'key' => 'wikibase-comment-update'
                );
diff --git a/client/includes/recentchanges/ExternalRecentChange.php 
b/client/includes/recentchanges/ExternalRecentChange.php
index d2a814f..248fb9f 100644
--- a/client/includes/recentchanges/ExternalRecentChange.php
+++ b/client/includes/recentchanges/ExternalRecentChange.php
@@ -30,7 +30,7 @@
         * @param array @attribs
         * @param \Title $title
         */
-       protected function buildAttributes( $attribs, $title ) {
+       private function buildAttributes( $attribs, $title ) {
                $metadata = $attribs['wikibase-repo-change'];
 
                $isBot = false;
diff --git a/client/includes/recentchanges/RecentChangesFilterOptions.php 
b/client/includes/recentchanges/RecentChangesFilterOptions.php
index b5facbd..2890004 100644
--- a/client/includes/recentchanges/RecentChangesFilterOptions.php
+++ b/client/includes/recentchanges/RecentChangesFilterOptions.php
@@ -12,7 +12,7 @@
  */
 class RecentChangesFilterOptions {
 
-       protected $opts;
+       private $opts;
 
        public function __construct( \FormOptions $opts ) {
                $this->opts = $opts;
@@ -25,7 +25,7 @@
         *
         * @return bool
         */
-       protected function isDisabled() {
+       private function isDisabled() {
                $rcSetting = WikibaseClient::getDefaultInstance()->getSettings()
                        ->getSetting( 'showExternalRecentChanges' );
 
@@ -44,7 +44,7 @@
         *
         * @return bool
         */
-       protected function hideWikibase() {
+       private function hideWikibase() {
                // @TODO: Remve naming inconsistency (hideWikibase <> 
hideWikidata)
                if ( isset( $this->opts['hidewikidata'] ) && 
$this->opts['hidewikidata'] === true ) {
                        return true;
@@ -61,7 +61,7 @@
         *
         * @return bool
         */
-       protected function isEnhancedChanges() {
+       private function isEnhancedChanges() {
                // @todo evil globals, though the recent changes and watchlist 
query hooks
                // so nor provide access to context
                global $wgRequest, $wgUser;
diff --git a/client/includes/scribunto/Scribunto_LuaWikibaseEntityLibrary.php 
b/client/includes/scribunto/Scribunto_LuaWikibaseEntityLibrary.php
index 5e86645..8c01872 100644
--- a/client/includes/scribunto/Scribunto_LuaWikibaseEntityLibrary.php
+++ b/client/includes/scribunto/Scribunto_LuaWikibaseEntityLibrary.php
@@ -17,7 +17,7 @@
 class Scribunto_LuaWikibaseEntityLibrary extends Scribunto_LuaLibraryBase {
 
        /* @var WikibaseLuaEntityBindings */
-       protected $wbLibrary;
+       private $wbLibrary;
 
        /**
         * Constructor for wrapper class, initialize member object holding 
implementation
diff --git a/client/includes/scribunto/Scribunto_LuaWikibaseLibrary.php 
b/client/includes/scribunto/Scribunto_LuaWikibaseLibrary.php
index c4e9719..228db22 100644
--- a/client/includes/scribunto/Scribunto_LuaWikibaseLibrary.php
+++ b/client/includes/scribunto/Scribunto_LuaWikibaseLibrary.php
@@ -17,7 +17,7 @@
 class Scribunto_LuaWikibaseLibrary extends Scribunto_LuaLibraryBase {
 
        /* @var Wikibase\Client\WikibaseLuaBindings */
-       protected $wbLibrary;
+       private $wbLibrary;
 
        /**
         * Constructor for wrapper class, initialize member object holding 
implementation
diff --git a/client/includes/scribunto/WikibaseLuaBindings.php 
b/client/includes/scribunto/WikibaseLuaBindings.php
index 5734dc5..2c2d8a1 100644
--- a/client/includes/scribunto/WikibaseLuaBindings.php
+++ b/client/includes/scribunto/WikibaseLuaBindings.php
@@ -25,28 +25,28 @@
 class WikibaseLuaBindings {
 
        /* @var EntityIdParser */
-       protected $entityIdParser;
+       private $entityIdParser;
 
        /* @var EntityLookup */
-       protected $entityLookup;
+       private $entityLookup;
 
        /* @var EntityIdFormatter */
-       protected $entityIdFormatter;
+       private $entityIdFormatter;
 
        /* @var SiteLinkLookup */
-       protected $siteLinkTable;
+       private $siteLinkTable;
 
        /* @var LanguageFallbackChainFactory */
-       protected $fallbackChainFactory;
+       private $fallbackChainFactory;
 
        /* @var Language */
-       protected $language;
+       private $language;
 
        /* @var string[] */
-       protected $languageCodes;
+       private $languageCodes;
 
        /* @var string */
-       protected $siteId;
+       private $siteId;
 
        /**
         * @param EntityIdParser $entityIdParser
diff --git a/client/includes/scribunto/WikibaseLuaEntityBindings.php 
b/client/includes/scribunto/WikibaseLuaEntityBindings.php
index c1649d8..2448e51 100644
--- a/client/includes/scribunto/WikibaseLuaEntityBindings.php
+++ b/client/includes/scribunto/WikibaseLuaEntityBindings.php
@@ -24,16 +24,16 @@
 class WikibaseLuaEntityBindings {
 
        /* @var EntityLookup */
-       protected $entityLookup;
+       private $entityLookup;
 
        /* @var Language */
-       protected $language;
+       private $language;
 
        /* @var string */
-       protected $siteId;
+       private $siteId;
 
        /* @var SnakFormatter */
-       protected $snakFormatter;
+       private $snakFormatter;
 
        /* @var Entity[] */
        private $entities = array();
diff --git a/client/includes/specials/SpecialUnconnectedPages.php 
b/client/includes/specials/SpecialUnconnectedPages.php
index 70f32c7..09a17a1 100644
--- a/client/includes/specials/SpecialUnconnectedPages.php
+++ b/client/includes/specials/SpecialUnconnectedPages.php
@@ -27,7 +27,7 @@
         *
         * @var string
         */
-       protected $startPage = '';
+       private $startPage = '';
 
        /**
         * The startPage as a title to start search at
@@ -36,7 +36,7 @@
         *
         * @var Title
         */
-       protected $startTitle = null;
+       private $startTitle = null;
 
        /**
         * The namespaceChecker
@@ -45,7 +45,7 @@
         *
         * @var NamespaceChecker
         */
-       protected $namespaceChecker = null;
+       private $namespaceChecker = null;
 
        /**
         * If the search should only include pages with iw-links
@@ -54,7 +54,7 @@
         *
         * @var string
         */
-       protected $iwData = '';
+       private $iwData = '';
 
        public function __construct() {
                parent::__construct( 'UnconnectedPages' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id40bf9c49f782a374d329fd3d43500417571b33e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Addshore <[email protected]>
Gerrit-Reviewer: Addshore <[email protected]>
Gerrit-Reviewer: Adrian Lang <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Jeroen De Dauw <[email protected]>
Gerrit-Reviewer: WikidataJenkins <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to