Thiemo Mättig (WMDE) has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/258966

Change subject: Remove unused variables from two utilities
......................................................................

Remove unused variables from two utilities

Change-Id: I7f2641337c621f9558dc42335443908e7bdbc035
---
M find-long-functions.php
M stylize.php
2 files changed, 2 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/code-utils 
refs/changes/66/258966/1

diff --git a/find-long-functions.php b/find-long-functions.php
index 44cedbf..7fdd770 100755
--- a/find-long-functions.php
+++ b/find-long-functions.php
@@ -98,13 +98,11 @@
                        $name_token = $tokens->nextOfKind( T_STRING );
 
                        if ( $token[0] == T_CLASS ) {
-                               $TYPE = 'class';
                                $state['cdepth'] = $state['depth'];
                                $state['cstart_line'] = $state['cur_line'];
                                $state['class']  = $name_token[1];
                                print "Analyzing class {$state['class']}\n";
                        } else {
-                               $TYPE = 'function';
                                $state['fdepth'] = $state['depth'];
                                $state['fstart_line'] = $state['cur_line'];
                                if ( $state['class'] ) {
@@ -151,7 +149,6 @@
         * Skip tokens until we reach the wanted token, return it.
         */
        function nextOfKind( $wanted_token_index ) {
-               $found = false;
                while ( true ) {
                        $this->next();
                        $token = $this->current();
diff --git a/stylize.php b/stylize.php
index 7951f8d..a34b524 100755
--- a/stylize.php
+++ b/stylize.php
@@ -272,9 +272,9 @@
        function stylize() {
                $out = '';
                for ( $this->p = 0; $this->p < count( $this->tokens ); 
$this->p++ ) {
-                       list( $prevType, $prevText ) = $prevToken = 
$this->getPrev();
+                       list( $prevType, ) = $prevToken = $this->getPrev();
                        list( $curType, $curText ) = $curToken = 
$this->getCurrent();
-                       list( $nextType, $nextText ) = $nextToken = 
$this->getNext();
+                       list( $nextType, ) = $nextToken = $this->getNext();
 
                        // Don't format strings
                        if ( $curType == '"' ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7f2641337c621f9558dc42335443908e7bdbc035
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/code-utils
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>

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

Reply via email to