jenkins-bot has submitted this change and it was merged.
Change subject: Remove null assignment for class properties
......................................................................
Remove null assignment for class properties
They add no value.
Change-Id: I373e3035a57d66db066c7afb6d1ebc1b79adc2f9
---
M MessageCollection.php
M MessageGroups.php
M ffs/MediaWikiComplexMessages.php
M messagegroups/WikiMessageGroup.php
M scripts/fuzzy.php
M specials/SpecialTranslate.php
M tag/SpecialPageTranslationMovePage.php
M tag/TPException.php
M tag/TPParse.php
M tag/TranslatablePage.php
M utils/MessageHandle.php
M utils/TranslateMetadata.php
M webservices/TranslationQuery.php
13 files changed, 28 insertions(+), 28 deletions(-)
Approvals:
Nikerabbit: Looks good to me, approved
jenkins-bot: Verified
diff --git a/MessageCollection.php b/MessageCollection.php
index 5c2259f..c959791 100644
--- a/MessageCollection.php
+++ b/MessageCollection.php
@@ -52,10 +52,10 @@
// Database resources
/// \type{Database Result Resource} Stored message existence and fuzzy
state.
- protected $dbInfo = null;
+ protected $dbInfo;
/// \type{Database Result Resource} Stored translations in database.
- protected $dbData = null;
+ protected $dbData;
/// \type{Database Result Resource} Stored reviews in database.
protected $dbReviewData = array();
diff --git a/MessageGroups.php b/MessageGroups.php
index 74b9ade..486c165 100644
--- a/MessageGroups.php
+++ b/MessageGroups.php
@@ -18,17 +18,17 @@
/**
* @var string[]|null Cache for message group priorities
*/
- protected static $prioritycache = null;
+ protected static $prioritycache;
/**
* @var array|null
*/
- protected $groups = null;
+ protected $groups;
/**
* @var BagOStuff|null
*/
- protected $cache = null;
+ protected $cache;
/// Initialises the list of groups
protected function init() {
diff --git a/ffs/MediaWikiComplexMessages.php b/ffs/MediaWikiComplexMessages.php
index 7918d24..7d42732 100644
--- a/ffs/MediaWikiComplexMessages.php
+++ b/ffs/MediaWikiComplexMessages.php
@@ -19,9 +19,9 @@
const LANG_CURRENT = 2;
const PLACEHOLDER = 'languagecodeplaceholder';
- protected $language = null;
- protected $targetHtmlCode = null;
- protected $targetDir = null;
+ protected $language;
+ protected $targetHtmlCode;
+ protected $targetDir;
protected $id = '__BUG__';
protected $variable = '__BUG__';
protected $data = array();
diff --git a/messagegroups/WikiMessageGroup.php
b/messagegroups/WikiMessageGroup.php
index c14ca64..d7b4bd5 100644
--- a/messagegroups/WikiMessageGroup.php
+++ b/messagegroups/WikiMessageGroup.php
@@ -19,7 +19,7 @@
* @ingroup MessageGroup
*/
class WikiMessageGroup extends MessageGroupOld {
- protected $source = null;
+ protected $source;
/**
* Constructor.
diff --git a/scripts/fuzzy.php b/scripts/fuzzy.php
index 678a345..2dbd567 100644
--- a/scripts/fuzzy.php
+++ b/scripts/fuzzy.php
@@ -104,7 +104,7 @@
/**
* @var string Edit summary.
*/
- public $comment = null;
+ public $comment;
/**
* string[] List of language codes to skip.
diff --git a/specials/SpecialTranslate.php b/specials/SpecialTranslate.php
index f224768..899f3ce 100644
--- a/specials/SpecialTranslate.php
+++ b/specials/SpecialTranslate.php
@@ -16,14 +16,14 @@
*/
class SpecialTranslate extends SpecialPage {
/** @var TranslateTask */
- protected $task = null;
+ protected $task;
/** @var MessageGroup */
- protected $group = null;
+ protected $group;
- protected $defaults = null;
+ protected $defaults;
protected $nondefaults = array();
- protected $options = null;
+ protected $options;
public function __construct() {
parent::__construct( 'Translate' );
diff --git a/tag/SpecialPageTranslationMovePage.php
b/tag/SpecialPageTranslationMovePage.php
index 5702586..3f6eb88 100644
--- a/tag/SpecialPageTranslationMovePage.php
+++ b/tag/SpecialPageTranslationMovePage.php
@@ -51,12 +51,12 @@
/**
* @var Title[] Cached list of translation pages. Not yet loaded if
null.
*/
- protected $translationPages = null;
+ protected $translationPages;
/**
* @var Title[] Cached list of section pages. Not yet loaded if null.
*/
- protected $sectionPages = null;
+ protected $sectionPages;
public function __construct() {
parent::__construct( 'Movepage' );
diff --git a/tag/TPException.php b/tag/TPException.php
index d4a5cfc..b0a1f39 100644
--- a/tag/TPException.php
+++ b/tag/TPException.php
@@ -14,7 +14,7 @@
* @ingroup PageTranslation
*/
class TPException extends MWException {
- protected $msg = null;
+ protected $msg;
/**
* @todo Pass around Messages when Status class doesn't suck
diff --git a/tag/TPParse.php b/tag/TPParse.php
index 0385846..49653b6 100644
--- a/tag/TPParse.php
+++ b/tag/TPParse.php
@@ -16,7 +16,7 @@
*/
class TPParse {
/// \type{Title} Title of the page.
- protected $title = null;
+ protected $title;
/** \arrayof{String,TPSection} Parsed sections indexed with placeholder.
* @todo Encapsulate
diff --git a/tag/TranslatablePage.php b/tag/TranslatablePage.php
index 8cb6b8d..457280a 100644
--- a/tag/TranslatablePage.php
+++ b/tag/TranslatablePage.php
@@ -16,25 +16,25 @@
/**
* Title of the page.
*/
- protected $title = null;
+ protected $title;
/**
* Text contents of the page.
*/
- protected $text = null;
+ protected $text;
/**
* Revision of the page, if applicaple.
*
* @var int
*/
- protected $revision = null;
+ protected $revision;
/**
* From which source this object was constructed.
* Can be: text, revision, title
*/
- protected $source = null;
+ protected $source;
/**
* Whether the page contents is already loaded.
@@ -50,7 +50,7 @@
* Whether the title should be translated
* @var bool
*/
- protected $pageDisplayTitle = null;
+ protected $pageDisplayTitle;
protected $cachedParse;
diff --git a/utils/MessageHandle.php b/utils/MessageHandle.php
index 00e8871..eed4b3b 100644
--- a/utils/MessageHandle.php
+++ b/utils/MessageHandle.php
@@ -20,17 +20,17 @@
/**
* @var string|null
*/
- protected $key = null;
+ protected $key;
/**
* @var string|null Language code
*/
- protected $code = null;
+ protected $code;
/**
* @var string[]|null
*/
- protected $groupIds = null;
+ protected $groupIds;
public function __construct( Title $title ) {
$this->title = $title;
diff --git a/utils/TranslateMetadata.php b/utils/TranslateMetadata.php
index 540128c..9d3c8b9 100644
--- a/utils/TranslateMetadata.php
+++ b/utils/TranslateMetadata.php
@@ -11,7 +11,7 @@
*/
class TranslateMetadata {
- protected static $cache = null;
+ protected static $cache;
/**
* Get a metadata value for the given group and key.
diff --git a/webservices/TranslationQuery.php b/webservices/TranslationQuery.php
index ffe7ec2..ce7135c 100644
--- a/webservices/TranslationQuery.php
+++ b/webservices/TranslationQuery.php
@@ -17,7 +17,7 @@
protected $timeout = 0;
protected $method = 'GET';
protected $params = array();
- protected $body = null;
+ protected $body;
// URL is mandatory, so using it here
public static function factory( $url ) {
--
To view, visit https://gerrit.wikimedia.org/r/275017
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I373e3035a57d66db066c7afb6d1ebc1b79adc2f9
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Siebrand <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits