From: Reedy Date: Sun, 14 Apr 2019 01:36:34 +0000 (+0100) Subject: Remove unused constructor parameter and unused member variables X-Git-Tag: 1.34.0-rc.0~2000 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=c5a438e9deaef5bcb6bd85ce38e3ec34337698a2 Remove unused constructor parameter and unused member variables Make member variables private Change-Id: Ie76f30a5c5731529256b2b160f6dde4d49646545 --- diff --git a/includes/api/ApiFeedRecentChanges.php b/includes/api/ApiFeedRecentChanges.php index e5dba8fe4a..678b97b0a5 100644 --- a/includes/api/ApiFeedRecentChanges.php +++ b/includes/api/ApiFeedRecentChanges.php @@ -101,7 +101,7 @@ class ApiFeedRecentChanges extends ApiBase { $this->dieWithError( [ 'apierror-invalidtitle', wfEscapeWikiText( $this->params['target'] ) ] ); } - $feed = new ChangesFeed( $feedFormat, false ); + $feed = new ChangesFeed( $feedFormat ); $feedObj = $feed->getFeedObject( $this->msg( 'recentchangeslinked-title', $title->getPrefixedText() ) ->inContentLanguage()->text(), @@ -109,7 +109,7 @@ class ApiFeedRecentChanges extends ApiBase { SpecialPage::getTitleFor( 'Recentchangeslinked' )->getFullURL() ); } else { - $feed = new ChangesFeed( $feedFormat, 'rcfeed' ); + $feed = new ChangesFeed( $feedFormat ); $feedObj = $feed->getFeedObject( $this->msg( 'recentchanges' )->inContentLanguage()->text(), $this->msg( 'recentchanges-feed-description' )->inContentLanguage()->text(), diff --git a/includes/changes/ChangesFeed.php b/includes/changes/ChangesFeed.php index a71dcbb14c..4d00fbc543 100644 --- a/includes/changes/ChangesFeed.php +++ b/includes/changes/ChangesFeed.php @@ -26,15 +26,13 @@ * @ingroup Feed */ class ChangesFeed { - public $format, $type, $titleMsg, $descMsg; + private $format; /** * @param string $format Feed's format (either 'rss' or 'atom') - * @param string $type Type of feed (for cache keys) */ - public function __construct( $format, $type ) { + public function __construct( $format ) { $this->format = $format; - $this->type = $type; } /**