Mark private properties in ContribsPager as "private"
authorThiemo Kreuz <thiemo.kreuz@wikimedia.de>
Thu, 20 Dec 2018 16:58:15 +0000 (17:58 +0100)
committerUmherirrender <umherirrender_de.wp@web.de>
Fri, 21 Dec 2018 19:37:44 +0000 (19:37 +0000)
There should not be any code accessing these. The way to set these
properties is via the constructor.

Change-Id: I8f2a8e88b8dfad53d0b16bc3f73974b894a031fb

includes/specials/pagers/ContribsPager.php

index 16a5e91..59f26a2 100644 (file)
@@ -33,12 +33,12 @@ class ContribsPager extends RangeChronologicalPager {
        /**
         * @var string[] Local cache for escaped messages
         */
-       public $messages;
+       private $messages;
 
        /**
         * @var string User name, or a string describing an IP address range
         */
-       public $target;
+       private $target;
 
        /**
         * @var string Set to "newbie" to list contributions from the most recent 1% registered users.
@@ -49,7 +49,7 @@ class ContribsPager extends RangeChronologicalPager {
        /**
         * @var string|int A single namespace number, or an empty string for all namespaces
         */
-       public $namespace = '';
+       private $namespace = '';
 
        /**
         * @var string|false Name of tag to filter, or false to ignore tags
@@ -87,22 +87,22 @@ class ContribsPager extends RangeChronologicalPager {
         */
        private $hideMinor;
 
-       public $preventClickjacking = false;
+       private $preventClickjacking = false;
 
        /** @var IDatabase */
-       public $mDbSecondary;
+       private $mDbSecondary;
 
        /**
         * @var array
         */
-       protected $mParentLens;
+       private $mParentLens;
 
        /**
         * @var TemplateParser
         */
-       protected $templateParser;
+       private $templateParser;
 
-       function __construct( IContextSource $context, array $options ) {
+       public function __construct( IContextSource $context, array $options ) {
                parent::__construct( $context );
 
                $msgs = [