jenkins-bot has submitted this change and it was merged.

Change subject: Hygiene: Remove unused local variables
......................................................................


Hygiene: Remove unused local variables

Change-Id: I6281092e98120d4a2d106c59188478e44a3e0ccf
---
M container.php
M includes/Block/BoardHistory.php
M includes/Block/Header.php
M includes/Block/Topic.php
M includes/Block/TopicList.php
M includes/TemplateHelper.php
M includes/api/ApiFlowBasePost.php
7 files changed, 2 insertions(+), 15 deletions(-)

Approvals:
  Jdlrobson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/container.php b/container.php
index 7238e75..e2c4506 100644
--- a/container.php
+++ b/container.php
@@ -204,7 +204,6 @@
 } );
 
 $c['storage.board_history'] = $c->share( function( $c ) {
-       $cache = $c['memcache.buffered'];
        $mapper = new BasicObjectMapper(
                function( $rev ) use( $c ) {
                        if ( $rev instanceof PostRevision ) {
@@ -480,7 +479,6 @@
 } );
 
 $c['storage.topic_history'] = $c->share( function( $c ) {
-       $cache = $c['memcache.buffered'];
        $mapper = new BasicObjectMapper(
                function( $rev ) use( $c ) {
                        if ( $rev instanceof PostRevision ) {
@@ -533,7 +531,6 @@
 } );
 // User subscriptions are triggered by updates on workflow objects.
 $c['storage.user_subs'] = $c->share( function( $c ) {
-       $cache = $c['memcache.buffered'];
        $mapper = BasicObjectMapper::model( 'Flow\\Model\\UserSubscription' );
        $storage = $c['storage.user_subs.backing'];
        $indexes = array(
diff --git a/includes/Block/BoardHistory.php b/includes/Block/BoardHistory.php
index 377381e..a50c29f 100644
--- a/includes/Block/BoardHistory.php
+++ b/includes/Block/BoardHistory.php
@@ -62,7 +62,7 @@
                $formatter->setIncludeHistoryProperties( true );
                $ctx = \RequestContext::getMain();
 
-               $posts = $revisions = array();
+               $revisions = array();
                foreach ( $history as $row ) {
                        $serialized = $formatter->formatApi( $row, $ctx );
                        $revisions[$serialized['revisionId']] = $serialized;
diff --git a/includes/Block/Header.php b/includes/Block/Header.php
index 1c979e6..9ad3b73 100644
--- a/includes/Block/Header.php
+++ b/includes/Block/Header.php
@@ -121,7 +121,6 @@
                }
 
                // this isn't really part of validate, but we want the 
error-rendering template to see the users edited header
-               $oldHeader = $this->header;
                $this->newRevision = $this->header->newNextRevision( 
$this->user, $this->submitted['content'], 'edit-header' );
 
                if ( !$this->checkSpamFilters( $this->header, 
$this->newRevision ) ) {
diff --git a/includes/Block/Topic.php b/includes/Block/Topic.php
index 8df25ab..ea9588d 100644
--- a/includes/Block/Topic.php
+++ b/includes/Block/Topic.php
@@ -397,9 +397,7 @@
 
                        $this->storage->put( $this->newRevision );
                        $this->storage->put( $this->workflow );
-                       $self = $this;
                        $newRevision = $this->newRevision;
-                       $rootPost = $this->loadRootPost();
 
                        // If no context was loaded render the post in isolation
                        // @todo make more explicit
@@ -633,7 +631,6 @@
                        $result[$serialized['revisionId']] = $serialized;
                }
 
-               $title = $this->workflow->getArticleTitle();
                return array(
                        'revisions' => $result,
                        'board' => $this->renderBoardTitle()
diff --git a/includes/Block/TopicList.php b/includes/Block/TopicList.php
index ff98b2d..6a05128 100644
--- a/includes/Block/TopicList.php
+++ b/includes/Block/TopicList.php
@@ -177,9 +177,6 @@
                        'user' => $this->user,
                ) );
 
-               $notificationController = $this->notificationController;
-               $topicWorkflow = $this->topicWorkflow;
-               $topicPost = $this->topicPost;
                $output = array(
                        'created-topic-id' => $this->topicWorkflow->getId(),
                        'created-post-id' => $this->firstPost ? 
$this->firstPost->getRevisionId() : null,
diff --git a/includes/TemplateHelper.php b/includes/TemplateHelper.php
index f482948..dbf0d06 100644
--- a/includes/TemplateHelper.php
+++ b/includes/TemplateHelper.php
@@ -409,8 +409,6 @@
                }
 
                $html = array();
-               $i = 0;
-               $last = count( $postIds ) - 1;
                foreach ( $postIds as $id ) {
                        $revId = $context['posts'][$id][0];
 
@@ -518,7 +516,6 @@
         * @return array
         */
        static public function historyDescription( array $revision ) {
-               $changeType = $revision['changeType'];
                $i18nKey = $revision['properties']['_key'];
                unset( $revision['properties']['_key'] );
 
diff --git a/includes/api/ApiFlowBasePost.php b/includes/api/ApiFlowBasePost.php
index 357977c..001dddd 100644
--- a/includes/api/ApiFlowBasePost.php
+++ b/includes/api/ApiFlowBasePost.php
@@ -30,7 +30,7 @@
                $request = $this->getModifiedRequest();
                $blocksToCommit = $loader->handleSubmit( $action, $blocks, 
$user, $request );
                if ( count( $blocksToCommit ) ) {
-                       $commitResults = $loader->commit( $workflow, 
$blocksToCommit );
+                       $loader->commit( $workflow, $blocksToCommit );
                        $savedBlocks = array();
                        $result->setIndexedTagName( $savedBlocks, 'block' );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6281092e98120d4a2d106c59188478e44a3e0ccf
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: frontend-rewrite
Gerrit-Owner: Matthias Mullie <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to