r88974 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88973‎ | r88974 | r88975 >
Date:16:17, 27 May 2011
Author:happy-melon
Status:ok
Tags:
Comment:
Merge upstream a few other miscellaneous core hacks, mostly whitespace and type hinting
Modified paths:
  • /trunk/extensions/SecurePoll/includes/entities/Election.php (modified) (history)
  • /trunk/extensions/SecurePoll/includes/main/Context.php (modified) (history)
  • /trunk/extensions/SecurePoll/includes/talliers/PluralityTallier.php (modified) (history)
  • /trunk/extensions/SecurePoll/includes/talliers/Tallier.php (modified) (history)
  • /trunk/extensions/SecurePoll/resources/SecurePoll.css (modified) (history)

Diff [purge]

Index: trunk/extensions/SecurePoll/includes/talliers/Tallier.php
@@ -29,6 +29,11 @@
3030 }
3131 }
3232
 33+ /**
 34+ * @param $context SecurePoll_Context
 35+ * @param $electionTallier SecurePoll_ElectionTallier
 36+ * @param $question SecurePoll_Question
 37+ */
3338 function __construct( $context, $electionTallier, $question ) {
3439 $this->context = $context;
3540 $this->question = $question;
Index: trunk/extensions/SecurePoll/includes/talliers/PluralityTallier.php
@@ -6,6 +6,11 @@
77 class SecurePoll_PluralityTallier extends SecurePoll_Tallier {
88 var $tally = array();
99
 10+ /**
 11+ * @param $context SecurePoll_Context
 12+ * @param $electionTallier SecurePoll_ElectionTallier
 13+ * @param $question SecurePoll_Question
 14+ */
1015 function __construct( $context, $electionTallier, $question ) {
1116 parent::__construct( $context, $electionTallier, $question );
1217 foreach ( $question->getOptions() as $option ) {
Index: trunk/extensions/SecurePoll/includes/entities/Election.php
@@ -176,6 +176,7 @@
177177 $wgLang->timeanddate( $date )
178178 );
179179 }
 180+
180181 # Blocked
181182 $notBlocked = $this->getProperty( 'not-blocked' );
182183 $isBlocked = !empty( $props['blocked'] );
Index: trunk/extensions/SecurePoll/includes/main/Context.php
@@ -61,7 +61,10 @@
6262 }
6363 }
6464
65 - /** Get the ParserOptions instance */
 65+ /**
 66+ * Get the ParserOptions instance
 67+ * @return ParserOptions
 68+ */
6669 function getParserOptions() {
6770 if ( !$this->parserOptions ) {
6871 $this->parserOptions = new ParserOptions;
@@ -69,7 +72,10 @@
7073 return $this->parserOptions;
7174 }
7275
73 - /** Get the SecurePoll_Store instance */
 76+ /**
 77+ * Get the SecurePoll_Store instance
 78+ * @return SecurePoll_Store
 79+ */
7480 function getStore() {
7581 if ( !isset( $this->store ) ) {
7682 $this->store = new $this->storeClass;
@@ -167,6 +173,7 @@
168174 /**
169175 * Get a SecurePoll_Random instance. This provides cryptographic random
170176 * number generation.
 177+ * @return SecurePoll_Random
171178 */
172179 function getRandom() {
173180 if ( !$this->random ) {
@@ -238,6 +245,7 @@
239246 /**
240247 * Get a database object, or throw an exception if the current store object
241248 * does not support database operations.
 249+ * @return DatabaseBase
242250 */
243251 function getDB() {
244252 if ( !isset( $this->db ) ) {
Index: trunk/extensions/SecurePoll/resources/SecurePoll.css
@@ -47,21 +47,21 @@
4848 }
4949
5050 .securepoll-table {
51 - margin: 1em 1em 1em 0;
52 - background: #f9f9f9;
53 - border: thin #aaa solid;
54 - border-collapse: collapse;
 51+ margin: 1em 1em 1em 0;
 52+ background: #f9f9f9;
 53+ border: thin #aaa solid;
 54+ border-collapse: collapse;
5555 }
5656 .securepoll-table th, .securepoll-table td {
57 - border: thin #aaa solid;
58 - padding: 0.4em;
 57+ border: thin #aaa solid;
 58+ padding: 0.4em;
5959 }
6060 .securepoll-table th {
61 - background: #f2f2f2;
62 - text-align: center;
 61+ background: #f2f2f2;
 62+ text-align: center;
6363 }
6464 .securepoll-table caption {
65 - font-weight: bold;
 65+ font-weight: bold;
6666 }
6767
6868 .securepoll-ballot-table {
@@ -71,14 +71,14 @@
7272 font-weight: bold;
7373 text-align: center;
7474 border: thin #999 solid;
75 - padding: 0 1.5em 0 1.5em;
 75+ padding: 0 1.5em;
7676 }
7777 .securepoll-ballot-table td {
7878 text-align: center;
7979 border-left: thin #999 solid;
8080 border-right: thin #999 solid;
8181 border-bottom: thin #bbb dotted;
82 - padding: 0 1.5em 0 1.5em;
 82+ padding: 0 1.5em;
8383 }
8484 .securepoll-ballot-table td.securepoll-ballot-optlabel { /* High specificity */
8585 text-align: left;

Sign-offs

UserFlagDate
Werdnainspected07:07, 28 May 2011

Status & tagging log