[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Make phpcs pass - cli
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/358064 ) Change subject: Make phpcs pass - cli .. Make phpcs pass - cli Change-Id: I145da93bcb92b2f2aed9c24bfe9fa33ae8738e28 --- M cli/cli.inc M cli/convertVotes.php M cli/delete.php M cli/dump.php M cli/dumpComments.php M cli/dumpVoteCsv.php M cli/import.php M cli/makeSimpleList.php M cli/purgePrivateVoteData.php M cli/tally.php M cli/testDebian.php M cli/voterList.php M cli/wm-scripts/bv2013/buildSpamTranslations.php M cli/wm-scripts/bv2013/doSpam.php M cli/wm-scripts/bv2013/dumpMetaTranslations.php M cli/wm-scripts/bv2013/populateEditCount.php M cli/wm-scripts/bv2013/sendMails.php M cli/wm-scripts/bv2013/voterList.php M cli/wm-scripts/bv2015/doSpam.php M cli/wm-scripts/bv2015/populateEditCount-fixup.php M cli/wm-scripts/bv2015/populateEditCount.php M cli/wm-scripts/bv2015/voterList.php M cli/wm-scripts/bv2017/doSpam.php M cli/wm-scripts/bv2017/populateEditCount.php M cli/wm-scripts/bv2017/voterList.php M cli/wm-scripts/dumpGlobalVoterList.php 26 files changed, 42 insertions(+), 65 deletions(-) Approvals: Huji: Looks good to me, approved jenkins-bot: Verified diff --git a/cli/cli.inc b/cli/cli.inc index ea3d7f9..3b112bb 100644 --- a/cli/cli.inc +++ b/cli/cli.inc @@ -13,4 +13,4 @@ exit( 1 ); } -require( $IP . '/maintenance/commandLine.inc' ); +require $IP . '/maintenance/commandLine.inc'; diff --git a/cli/convertVotes.php b/cli/convertVotes.php index 6727dac..ed9c385 100644 --- a/cli/convertVotes.php +++ b/cli/convertVotes.php @@ -1,6 +1,6 @@ convertLocalElection( $options['name'] ); } - class SecurePoll_ConvertVotes { public $context, $election; diff --git a/cli/delete.php b/cli/delete.php index d0d26d2..17443ed 100644 --- a/cli/delete.php +++ b/cli/delete.php @@ -1,6 +1,6 @@ @@ -82,4 +81,3 @@ } fwrite( $election->cbdata['outFile'], "" . $row->vote_record . "\n" ); } - diff --git a/cli/dumpComments.php b/cli/dumpComments.php index 71d5270..1ff5999 100644 --- a/cli/dumpComments.php +++ b/cli/dumpComments.php @@ -11,7 +11,7 @@ */ $optionsWithArgs = array( 'name' ); -require( __DIR__.'/cli.inc' ); +require __DIR__ . '/cli.inc'; $wgTitle = Title::newFromText( 'Special:SecurePoll' ); @@ -29,7 +29,7 @@ if ( isset( $options['name'] ) ) { spFatal( "Cannot load from database when SecurePoll is not installed" ); } - require( __DIR__ . '/../SecurePoll.php' ); + require __DIR__ . '/../SecurePoll.php'; } $context = new SecurePoll_Context; @@ -55,13 +55,12 @@ if ( !$status->isOK() ) { spFatal( "Tally error: " . $status->getWikiText() ); } -//$tallier = $status->value; +// $tallier = $status->value; if ( isset( $options['html'] ) ) { echo $tallier->getHtmlResult(); } else { echo $tallier->getTextResult(); } - function spFatal( $message ) { fwrite( STDERR, rtrim( $message ) . "\n" ); diff --git a/cli/dumpVoteCsv.php b/cli/dumpVoteCsv.php index 14d7fe2..d019227 100644 --- a/cli/dumpVoteCsv.php +++ b/cli/dumpVoteCsv.php @@ -11,7 +11,7 @@ */ $optionsWithArgs = array( 'name' ); -require( __DIR__.'/cli.inc' ); +require __DIR__ . '/cli.inc'; $wgTitle = Title::newFromText( 'Special:SecurePoll' ); @@ -29,7 +29,7 @@ if ( isset( $options['name'] ) ) { spFatal( "Cannot load from database when SecurePoll is not installed" ); } - require( __DIR__ . '/../SecurePoll.php' ); + require __DIR__ . '/../SecurePoll.php'; } $context = new SecurePoll_Context; @@ -55,13 +55,12 @@ if ( !$status->isOK() ) { spFatal( "Tally error: " . $status->getWikiText() ); } -//$tallier = $status->value; +// $tallier = $status->value; if ( isset( $options['html'] ) ) { echo $tallier->getHtmlResult(); } else { echo $tallier->getTextResult(); } - function spFatal( $message ) { fwrite( STDERR, rtrim( $message ) . "\n" ); diff --git a/cli/import.php b/cli/import.php index 92ba7ec..20470c5 100644 --- a/cli/import.php +++ b/cli/import.php @@ -1,6 +1,6 @@ el_entity; $this->output( "Election '{$row->el_title}' with end date '{$row->el_end_date}' " . "will have data purged\n" ); @@ -92,7 +91,7 @@ $setMin = null; $setMax = null; - foreach ( $vRes as $row ) { + foreach ( $vRes as $row ) { if ( $setMin === null ) { $setMin = $row->vote_id; } @@ -100,7 +99,7 @@ } $deleteSets[] = array( $setMin, $setMax ); $minVoteId = $setMax; - } while(
[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Make phpcs pass - cli
Umherirrender has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/358064 ) Change subject: Make phpcs pass - cli .. Make phpcs pass - cli Change-Id: I145da93bcb92b2f2aed9c24bfe9fa33ae8738e28 --- M cli/cli.inc M cli/convertVotes.php M cli/delete.php M cli/dump.php M cli/dumpComments.php M cli/dumpVoteCsv.php M cli/import.php M cli/makeSimpleList.php M cli/purgePrivateVoteData.php M cli/tally.php M cli/testDebian.php M cli/voterList.php M cli/wm-scripts/bv2013/buildSpamTranslations.php M cli/wm-scripts/bv2013/doSpam.php M cli/wm-scripts/bv2013/dumpMetaTranslations.php M cli/wm-scripts/bv2013/populateEditCount.php M cli/wm-scripts/bv2013/sendMails.php M cli/wm-scripts/bv2013/voterList.php M cli/wm-scripts/bv2015/doSpam.php M cli/wm-scripts/bv2015/populateEditCount-fixup.php M cli/wm-scripts/bv2015/populateEditCount.php M cli/wm-scripts/bv2015/voterList.php M cli/wm-scripts/bv2017/doSpam.php M cli/wm-scripts/bv2017/populateEditCount.php M cli/wm-scripts/bv2017/voterList.php M cli/wm-scripts/dumpGlobalVoterList.php 26 files changed, 42 insertions(+), 65 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SecurePoll refs/changes/64/358064/1 diff --git a/cli/cli.inc b/cli/cli.inc index ea3d7f9..3b112bb 100644 --- a/cli/cli.inc +++ b/cli/cli.inc @@ -13,4 +13,4 @@ exit( 1 ); } -require( $IP . '/maintenance/commandLine.inc' ); +require $IP . '/maintenance/commandLine.inc'; diff --git a/cli/convertVotes.php b/cli/convertVotes.php index 6727dac..ed9c385 100644 --- a/cli/convertVotes.php +++ b/cli/convertVotes.php @@ -1,6 +1,6 @@ convertLocalElection( $options['name'] ); } - class SecurePoll_ConvertVotes { public $context, $election; diff --git a/cli/delete.php b/cli/delete.php index d0d26d2..17443ed 100644 --- a/cli/delete.php +++ b/cli/delete.php @@ -1,6 +1,6 @@ @@ -82,4 +81,3 @@ } fwrite( $election->cbdata['outFile'], "" . $row->vote_record . "\n" ); } - diff --git a/cli/dumpComments.php b/cli/dumpComments.php index 71d5270..1ff5999 100644 --- a/cli/dumpComments.php +++ b/cli/dumpComments.php @@ -11,7 +11,7 @@ */ $optionsWithArgs = array( 'name' ); -require( __DIR__.'/cli.inc' ); +require __DIR__ . '/cli.inc'; $wgTitle = Title::newFromText( 'Special:SecurePoll' ); @@ -29,7 +29,7 @@ if ( isset( $options['name'] ) ) { spFatal( "Cannot load from database when SecurePoll is not installed" ); } - require( __DIR__ . '/../SecurePoll.php' ); + require __DIR__ . '/../SecurePoll.php'; } $context = new SecurePoll_Context; @@ -55,13 +55,12 @@ if ( !$status->isOK() ) { spFatal( "Tally error: " . $status->getWikiText() ); } -//$tallier = $status->value; +// $tallier = $status->value; if ( isset( $options['html'] ) ) { echo $tallier->getHtmlResult(); } else { echo $tallier->getTextResult(); } - function spFatal( $message ) { fwrite( STDERR, rtrim( $message ) . "\n" ); diff --git a/cli/dumpVoteCsv.php b/cli/dumpVoteCsv.php index 14d7fe2..d019227 100644 --- a/cli/dumpVoteCsv.php +++ b/cli/dumpVoteCsv.php @@ -11,7 +11,7 @@ */ $optionsWithArgs = array( 'name' ); -require( __DIR__.'/cli.inc' ); +require __DIR__ . '/cli.inc'; $wgTitle = Title::newFromText( 'Special:SecurePoll' ); @@ -29,7 +29,7 @@ if ( isset( $options['name'] ) ) { spFatal( "Cannot load from database when SecurePoll is not installed" ); } - require( __DIR__ . '/../SecurePoll.php' ); + require __DIR__ . '/../SecurePoll.php'; } $context = new SecurePoll_Context; @@ -55,13 +55,12 @@ if ( !$status->isOK() ) { spFatal( "Tally error: " . $status->getWikiText() ); } -//$tallier = $status->value; +// $tallier = $status->value; if ( isset( $options['html'] ) ) { echo $tallier->getHtmlResult(); } else { echo $tallier->getTextResult(); } - function spFatal( $message ) { fwrite( STDERR, rtrim( $message ) . "\n" ); diff --git a/cli/import.php b/cli/import.php index 92ba7ec..20470c5 100644 --- a/cli/import.php +++ b/cli/import.php @@ -1,6 +1,6 @@ el_entity; $this->output( "Election '{$row->el_title}' with end date '{$row->el_end_date}' " . "will have data purged\n" ); @@ -92,7 +91,7 @@ $setMin = null; $setMax = null; - foreach ( $vRes as $row ) { + foreach ( $vRes as $row ) { if ( $setMin === null ) { $setMin = $row->vote_id; } @@ -100,7 +99,7 @@ } $deleteSets[] = array( $setMin, $setMax ); $minVoteId = $setMax; -