jenkins-bot has submitted this change and it was merged.
Change subject: Declare visibility on class properties
......................................................................
Declare visibility on class properties
As pointed out by phpcs:
The var keyword must not be used to declare a property
(PSR2.Classes.PropertyDeclaration.VarUsed)
Set to public, as this is also done for class properties in classes these
ones extend.
Also break some long lines to silence CodeSniffer.
Change-Id: I77dd45eb2bf1d405d429603b97d5cbfb7ea04ad0
---
M includes/specials/SpecialContributions.php
M includes/specials/SpecialDeletedContributions.php
2 files changed, 31 insertions(+), 14 deletions(-)
Approvals:
Hashar: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/specials/SpecialContributions.php
b/includes/specials/SpecialContributions.php
index 5d9e554..0f910a5 100644
--- a/includes/specials/SpecialContributions.php
+++ b/includes/specials/SpecialContributions.php
@@ -227,7 +227,8 @@
* Generates the subheading with links
* @param $userObj User object for the target
* @return String: appropriately-escaped HTML to be output literally
- * @todo FIXME: Almost the same as getSubTitle in
SpecialDeletedContributions.php. Could be combined.
+ * @todo FIXME: Almost the same as getSubTitle in
SpecialDeletedContributions.php.
+ * Could be combined.
*/
protected function contributionsSub( $userObj ) {
if ( $userObj->isAnon() ) {
@@ -594,9 +595,11 @@
*/
class ContribsPager extends ReverseChronologicalPager {
public $mDefaultDirection = true;
- var $messages, $target;
- var $namespace = '', $mDb;
- var $preventClickjacking = false;
+ public $messages;
+ public $target;
+ public $namespace = '';
+ public $mDb;
+ public $preventClickjacking = false;
/**
* @var array
@@ -679,8 +682,13 @@
* $limit: see phpdoc above
* $descending: see phpdoc above
*/
- $data = array( $this->mDb->select( $tables, $fields, $conds,
$fname, $options, $join_conds ) );
- wfRunHooks( 'ContribsPager::reallyDoQuery', array( &$data,
$pager, $offset, $limit, $descending ) );
+ $data = array( $this->mDb->select(
+ $tables, $fields, $conds, $fname, $options, $join_conds
+ ) );
+ wfRunHooks(
+ 'ContribsPager::reallyDoQuery',
+ array( &$data, $pager, $offset, $limit, $descending )
+ );
$result = array();
@@ -944,7 +952,11 @@
$chardiff .= Linker::formatRevisionSize(
$row->rev_len );
$chardiff .= ' <span
class="mw-changeslist-separator">. .</span> ';
} else {
- $parentLen = isset(
$this->mParentLens[$row->rev_parent_id] ) ?
$this->mParentLens[$row->rev_parent_id] : 0;
+ $parentLen = 0;
+ if ( isset(
$this->mParentLens[$row->rev_parent_id] ) ) {
+ $this->mParentLens[$row->rev_parent_id];
+ }
+
$chardiff = ' <span
class="mw-changeslist-separator">. .</span> ';
$chardiff .=
ChangesList::showCharacterDifference(
$parentLen,
@@ -1001,11 +1013,14 @@
$diffHistLinks = $this->msg( 'parentheses' )
->rawParams( $difftext .
$this->messages['pipe-separator'] . $histlink )
->escaped();
- $ret = "{$del}{$d}
{$diffHistLinks}{$chardiff}{$nflag}{$mflag} {$link}{$userlink} {$comment}
{$topmarktext}";
+ $ret = "{$del}{$d}
{$diffHistLinks}{$chardiff}{$nflag}{$mflag} ";
+ $ret .= "{$link}{$userlink} {$comment} {$topmarktext}";
# Denote if username is redacted for this edit
if ( $rev->isDeleted( Revision::DELETED_USER ) ) {
- $ret .= " <strong>" . $this->msg(
'rev-deleted-user-contribs' )->escaped() . "</strong>";
+ $ret .= " <strong>" .
+ $this->msg( 'rev-deleted-user-contribs'
)->escaped() .
+ "</strong>";
}
# Tags, if any.
diff --git a/includes/specials/SpecialDeletedContributions.php
b/includes/specials/SpecialDeletedContributions.php
index 2cf1730..9b9888a 100644
--- a/includes/specials/SpecialDeletedContributions.php
+++ b/includes/specials/SpecialDeletedContributions.php
@@ -27,8 +27,10 @@
*/
class DeletedContribsPager extends IndexPager {
public $mDefaultDirection = true;
- var $messages, $target;
- var $namespace = '', $mDb;
+ public $messages;
+ public $target;
+ public $namespace = '';
+ public $mDb;
/**
* @var string Navigation bar with paging links.
@@ -358,9 +360,9 @@
# If there were contributions, and it was a valid user or IP,
show
# the appropriate "footer" message - WHOIS tools, etc.
if ( $target != 'newbies' ) {
- $message = IP::isIPAddress( $target )
- ? 'sp-contributions-footer-anon'
- : 'sp-contributions-footer';
+ $message = IP::isIPAddress( $target ) ?
+ 'sp-contributions-footer-anon' :
+ 'sp-contributions-footer';
if ( !$this->msg( $message )->isDisabled() ) {
$out->wrapWikiMsg(
--
To view, visit https://gerrit.wikimedia.org/r/87510
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I77dd45eb2bf1d405d429603b97d5cbfb7ea04ad0
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Siebrand <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits