jenkins-bot has submitted this change and it was merged.
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(-)
Approvals:
Hoo man: Looks good to me, approved
jenkins-bot: Verified
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: merged
Gerrit-Change-Id: I7f2641337c621f9558dc42335443908e7bdbc035
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/code-utils
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: Addshore <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits