r86582 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86581‎ | r86582 | r86583 >
Date:00:07, 21 April 2011
Author:demon
Status:ok (Comments)
Tags:
Comment:
Remove @static from all over the place. That's what the static keyword is for, this being PHP5 and all
Modified paths:
  • /trunk/phase3/includes/ChangesList.php (modified) (history)
  • /trunk/phase3/includes/Collation.php (modified) (history)
  • /trunk/phase3/includes/Linker.php (modified) (history)
  • /trunk/phase3/includes/MagicWord.php (modified) (history)
  • /trunk/phase3/includes/RecentChange.php (modified) (history)
  • /trunk/phase3/includes/api/ApiDelete.php (modified) (history)
  • /trunk/phase3/includes/api/ApiMain.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryImageInfo.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryLogEvents.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryRecentChanges.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryRevisions.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryUsers.php (modified) (history)
  • /trunk/phase3/includes/db/DatabasePostgres.php (modified) (history)
  • /trunk/phase3/includes/filerepo/ForeignAPIFile.php (modified) (history)
  • /trunk/phase3/includes/filerepo/LocalRepo.php (modified) (history)
  • /trunk/phase3/includes/filerepo/OldLocalFile.php (modified) (history)
  • /trunk/phase3/includes/installer/DatabaseUpdater.php (modified) (history)
  • /trunk/phase3/includes/parser/CoreLinkFunctions.php (modified) (history)
  • /trunk/phase3/includes/parser/CoreParserFunctions.php (modified) (history)
  • /trunk/phase3/includes/parser/CoreTagHooks.php (modified) (history)
  • /trunk/phase3/includes/parser/Parser.php (modified) (history)
  • /trunk/phase3/includes/revisiondelete/RevisionDeleter.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/RecentChange.php
@@ -340,7 +340,6 @@
341341 /**
342342 * Makes an entry in the database corresponding to an edit
343343 *
344 - * @static
345344 * @param $timestamp
346345 * @param $title Title
347346 * @param $minor
@@ -407,7 +406,6 @@
408407 * Note: the title object must be loaded with the new id using resetArticleID()
409408 * @todo Document parameters and return
410409 *
411 - * @static
412410 * @param $timestamp
413411 * @param $title Title
414412 * @param $minor
@@ -469,7 +467,6 @@
470468 # Makes an entry in the database corresponding to a rename
471469
472470 /**
473 - * @static
474471 * @param $timestamp
475472 * @param $oldTitle Title
476473 * @param $newTitle Title
@@ -547,7 +544,6 @@
548545 }
549546
550547 /**
551 - * @static
552548 * @param $timestamp
553549 * @param $title Title
554550 * @param $user User
Index: trunk/phase3/includes/parser/Parser.php
@@ -495,8 +495,6 @@
496496
497497 /**
498498 * Get a random string
499 - *
500 - * @static
501499 */
502500 static public function getRandomString() {
503501 return dechex( mt_rand( 0, 0x7fffffff ) ) . dechex( mt_rand( 0, 0x7fffffff ) );
Index: trunk/phase3/includes/parser/CoreParserFunctions.php
@@ -11,7 +11,6 @@
1212 */
1313 class CoreParserFunctions {
1414 /**
15 - * @static
1615 * @param $parser Parser
1716 * @return void
1817 */
@@ -89,7 +88,6 @@
9089 }
9190
9291 /**
93 - * @static
9492 * @param $parser Parser
9593 * @param string $part1
9694 * @return array
@@ -106,7 +104,6 @@
107105 }
108106
109107 /**
110 - * @static
111108 * @param $parser Parser
112109 * @param $date
113110 * @param null $defaultPref
@@ -190,7 +187,6 @@
191188 }
192189
193190 /**
194 - * @static
195191 * @param $parser Parser
196192 * @param string $s
197193 * @return
@@ -205,7 +201,6 @@
206202 }
207203
208204 /**
209 - * @static
210205 * @param $parser Parser
211206 * @param string $s
212207 * @return
@@ -249,7 +244,6 @@
250245 }
251246
252247 /**
253 - * @static
254248 * @param $parser Parser
255249 * @param string $num
256250 * @param null $raw
@@ -264,7 +258,6 @@
265259 }
266260
267261 /**
268 - * @static
269262 * @param $parser Parser
270263 * @param string $case
271264 * @param string $word
@@ -275,7 +268,6 @@
276269 }
277270
278271 /**
279 - * @static
280272 * @param $parser Parser
281273 * @param $user User
282274 * @return
@@ -306,7 +298,6 @@
307299 }
308300
309301 /**
310 - * @static
311302 * @param $parser Parser
312303 * @param string $text
313304 * @return
@@ -643,7 +634,6 @@
644635 }
645636
646637 /**
647 - * @static
648638 * @param $parser Parser
649639 * @param $text
650640 * @return string
@@ -663,7 +653,6 @@
664654 }
665655
666656 /**
667 - * @static
668657 * @param $parser Parser
669658 * @param $text
670659 * @return string
Index: trunk/phase3/includes/parser/CoreLinkFunctions.php
@@ -11,7 +11,6 @@
1212 */
1313 class CoreLinkFunctions {
1414 /**
15 - * @static
1615 * @param $parser Parser_LinkHooks
1716 * @return bool
1817 */
@@ -21,7 +20,6 @@
2221 }
2322
2423 /**
25 - * @static
2624 * @param $parser Parser
2725 * @param $holders LinkHolderArray
2826 * @param $markers LinkMarkerReplacer
@@ -45,7 +43,6 @@
4644 }
4745
4846 /**
49 - * @static
5047 * @param $parser Parser
5148 * @param $holders LinkHolderArray
5249 * @param $markers LinkMarkerReplacer
Index: trunk/phase3/includes/parser/CoreTagHooks.php
@@ -11,7 +11,6 @@
1212 */
1313 class CoreTagHooks {
1414 /**
15 - * @static
1615 * @param $parser Parser
1716 * @return void
1817 */
@@ -50,7 +49,6 @@
5150 }
5251
5352 /**
54 - * @static
5553 * @param $content
5654 * @param $attributes
5755 * @param $parser Parser
Index: trunk/phase3/includes/Linker.php
@@ -1208,7 +1208,6 @@
12091209 }
12101210
12111211 /**
1212 - * @static
12131212 * @param $contextTitle Title
12141213 * @param $target
12151214 * @param $text
Index: trunk/phase3/includes/db/DatabasePostgres.php
@@ -10,7 +10,6 @@
1111 private $name, $tablename, $type, $nullable, $max_length, $deferred, $deferrable, $conname;
1212
1313 /**
14 - * @static
1514 * @param $db DatabaseBase
1615 * @param $table
1716 * @param $field
Index: trunk/phase3/includes/filerepo/OldLocalFile.php
@@ -36,7 +36,6 @@
3737 }
3838
3939 /**
40 - * @static
4140 * @param $sha1
4241 * @param $repo LocalRepo
4342 * @param bool $timestamp
Index: trunk/phase3/includes/filerepo/LocalRepo.php
@@ -86,7 +86,6 @@
8787 /**
8888 * Gets the SHA1 hash from a storage key
8989 *
90 - * @static
9190 * @param string $key
9291 * @return string
9392 */
Index: trunk/phase3/includes/filerepo/ForeignAPIFile.php
@@ -29,7 +29,6 @@
3030 }
3131
3232 /**
33 - * @static
3433 * @param $title Title
3534 * @param $repo ForeignApiRepo
3635 * @return ForeignAPIFile|null
Index: trunk/phase3/includes/revisiondelete/RevisionDeleter.php
@@ -131,7 +131,6 @@
132132 * If it doesn't, returns the corresponding ar_timestamp field
133133 * so that this key can be used instead.
134134 *
135 - * @static
136135 * @param $title Title
137136 * @param $revid
138137 * @return bool|mixed
@@ -156,7 +155,6 @@
157156 /**
158157 * Creates utility links for log entries.
159158 *
160 - * @static
161159 * @param $title Title
162160 * @param $paramArray Array
163161 * @param $skin Skin
Index: trunk/phase3/includes/installer/DatabaseUpdater.php
@@ -88,7 +88,6 @@
8989 }
9090
9191 /**
92 - * @static
9392 * @throws MWException
9493 * @param DatabaseBase $db
9594 * @param bool $shared
Index: trunk/phase3/includes/api/ApiQueryRecentChanges.php
@@ -73,7 +73,6 @@
7474 }
7575
7676 /**
77 - * @static
7877 * @param $pageid
7978 * @param $title
8079 * @param $rc RecentChange
Index: trunk/phase3/includes/api/ApiDelete.php
@@ -155,7 +155,6 @@
156156 }
157157
158158 /**
159 - * @static
160159 * @param $token
161160 * @param $title Title
162161 * @param $oldimage
Index: trunk/phase3/includes/api/ApiQueryLogEvents.php
@@ -197,7 +197,6 @@
198198 }
199199
200200 /**
201 - * @static
202201 * @param $result ApiResult
203202 * @param $vals
204203 * @param $params
Index: trunk/phase3/includes/api/ApiMain.php
@@ -880,7 +880,6 @@
881881 }
882882
883883 /**
884 - * @static
885884 * @param $module ApiBase
886885 * @param $paramName String What type of request is this? e.g. action, query, list, prop, meta, format
887886 * @return string
Index: trunk/phase3/includes/api/ApiQueryImageInfo.php
@@ -486,7 +486,6 @@
487487 *
488488 * @param array $filter List of properties to filter out
489489 *
490 - * @static
491490 * @return Array
492491 */
493492 public static function getPropertyNames( $filter = array() ) {
@@ -496,7 +495,6 @@
497496 /**
498497 * Returns array key value pairs of properties and their descriptions
499498 *
500 - * @static
501499 * @return array
502500 */
503501 private static function getProperties() {
@@ -524,7 +522,6 @@
525523 *
526524 * @param array $filter List of properties to filter out
527525 *
528 - * @static
529526 * @return array
530527 */
531528 public static function getPropertyDescriptions( $filter = array() ) {
Index: trunk/phase3/includes/api/ApiQueryRevisions.php
@@ -74,7 +74,6 @@
7575 }
7676
7777 /**
78 - * @static
7978 * @param $pageid
8079 * @param $title Title
8180 * @param $rev Revision
Index: trunk/phase3/includes/api/ApiQueryUsers.php
@@ -67,7 +67,6 @@
6868 }
6969
7070 /**
71 - * @static
7271 * @param $user User
7372 * @return String
7473 */
Index: trunk/phase3/includes/ChangesList.php
@@ -17,7 +17,6 @@
1818 var $userlink, $timestamp, $watched;
1919
2020 /**
21 - * @static
2221 * @param $rc RecentChange
2322 * @return RCCacheEntry
2423 */
Index: trunk/phase3/includes/MagicWord.php
@@ -190,7 +190,6 @@
191191
192192 /**
193193 * Factory: creates an object representing an ID
194 - * @static
195194 * @return MagicWord
196195 */
197196 static function &get( $id ) {
@@ -481,6 +480,7 @@
482481 * thereby gaining some efficiency. The result is placed in the out variable
483482 * $result. The return value is true if something was replaced.
484483 * @static
 484+ * @todo Should this be static? It doesn't seem to be used at all
485485 **/
486486 function replaceMultiple( $magicarr, $subject, &$result ){
487487 $search = array();
Index: trunk/phase3/includes/Collation.php
@@ -4,7 +4,6 @@
55 static $instance;
66
77 /**
8 - * @static
98 * @return Collation
109 */
1110 static function singleton() {
@@ -16,7 +15,6 @@
1716 }
1817
1918 /**
20 - * @static
2119 * @throws MWException
2220 * @param $collationName string
2321 * @return Collation

Comments

#Comment by 😂 (talk | contribs)   14:04, 21 April 2011

I did this for Reedy :)

Status & tagging log