Merge "phpcs: Normalize methods declarations to "[final abstract] [visibility]"."
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 19 Feb 2013 17:16:16 +0000 (17:16 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 19 Feb 2013 17:16:16 +0000 (17:16 +0000)
includes/externalstore/ExternalStoreMedium.php
maintenance/deleteArchivedFiles.inc
maintenance/deleteArchivedRevisions.inc
maintenance/fuzz-tester.php
tests/parser/parserTest.inc
tests/selenium/Selenium.php
tests/selenium/SeleniumTestSuite.php

index 99d5fc3..34e43e2 100644 (file)
@@ -46,7 +46,7 @@ abstract class ExternalStoreMedium {
         * @return string|bool The text stored or false on error
         * @throws MWException
         */
-       public abstract function fetchFromURL( $url );
+       abstract public function fetchFromURL( $url );
 
        /**
         * Insert a data item into a given location
@@ -56,5 +56,5 @@ abstract class ExternalStoreMedium {
         * @return string|bool The URL of the stored data item, or false on error
         * @throws MWException
         */
-       public abstract function store( $location, $data );
+       abstract public function store( $location, $data );
 }
index cc09703..792ee6c 100644 (file)
@@ -27,7 +27,7 @@
  * @ingroup Maintenance
  */
 class DeleteArchivedFilesImplementation {
-       static public function doDelete( $output, $force ) {
+       public static function doDelete( $output, $force ) {
                # Data should come off the master, wrapped in a transaction
                $dbw = wfGetDB( DB_MASTER );
                $dbw->begin( __METHOD__ );
index 414d41a..dd8e3dd 100644 (file)
@@ -36,7 +36,7 @@ class DeleteArchivedRevisionsImplementation {
         * purgeRedundantText().  See Maintenance for a description of
         * those methods.
         */
-       static public function doDelete( $maint ) {
+       public static function doDelete( $maint ) {
                $dbw = wfGetDB( DB_MASTER );
 
                $dbw->begin( __METHOD__ );
index 445a3fb..6bb44a1 100644 (file)
@@ -747,7 +747,7 @@ class wikiFuzz {
        /**
         ** Randomly returns one element of the input array.
         */
-       static public function chooseInput( array $input ) {
+       public static function chooseInput( array $input ) {
                $randindex = wikiFuzz::randnum( count( $input ) - 1 );
                return $input[$randindex];
        }
@@ -761,7 +761,7 @@ class wikiFuzz {
         * @param $start int
         * @return int
         */
-       static public function randnum( $finish, $start = 0 ) {
+       public static function randnum( $finish, $start = 0 ) {
                return mt_rand( $start, $finish );
        }
 
@@ -769,7 +769,7 @@ class wikiFuzz {
         * Returns a mix of random text and random wiki syntax.
         * @return string
         */
-       static private function randstring() {
+       private static function randstring() {
                $thestring = "";
 
                for ( $i = 0; $i < 40; $i++ ) {
@@ -801,7 +801,7 @@ class wikiFuzz {
         *        or random data from "other".
         * @return string
         */
-       static private function makestring() {
+       private static function makestring() {
                $what = wikiFuzz::randnum( 2 );
                if ( $what == 0 ) {
                        return wikiFuzz::randstring();
@@ -818,7 +818,7 @@ class wikiFuzz {
         * @param $matches
         * @return string
         */
-       static private function stringEscape( $matches ) {
+       private static function stringEscape( $matches ) {
                return sprintf( "\\x%02x", ord( $matches[1] ) );
        }
 
@@ -828,7 +828,7 @@ class wikiFuzz {
         * @param $str string
         * @return string
         */
-       static public function makeTitleSafe( $str ) {
+       public static function makeTitleSafe( $str ) {
                $legalTitleChars = " %!\"$&'()*,\\-.\\/0-9:;=?@A-Z\\\\^_`a-z~\\x80-\\xFF";
                return preg_replace_callback(
                                "/([^$legalTitleChars])/", 'wikiFuzz::stringEscape',
@@ -839,7 +839,7 @@ class wikiFuzz {
         ** Returns a string of fuzz text.
         * @return string
         */
-       static private function loop() {
+       private static function loop() {
                switch ( wikiFuzz::randnum( 3 ) ) {
                        case 1: // an opening tag, with parameters.
                                $string = "";
@@ -868,7 +868,7 @@ class wikiFuzz {
         * Returns one of the three styles of random quote: ', ", and nothing.
         * @return string
         */
-       static private function getRandQuote() {
+       private static function getRandQuote() {
                switch ( wikiFuzz::randnum( 3 ) ) {
                        case 1 : return "'";
                        case 2 : return "\"";
@@ -881,7 +881,7 @@ class wikiFuzz {
         * @param $maxtypes int
         * @return string
         */
-       static public function makeFuzz( $maxtypes = 2 ) {
+       public static function makeFuzz( $maxtypes = 2 ) {
                $page = "";
                for ( $k = 0; $k < $maxtypes; $k++ ) {
                        $page .= wikiFuzz::loop();
index b9bb33f..aa56e6e 100644 (file)
@@ -228,7 +228,7 @@ class ParserTest {
         * Remove last character if it is a newline
         * @group utility
         */
-       static public function chomp( $s ) {
+       public static function chomp( $s ) {
                if ( substr( $s, -1 ) === "\n" ) {
                        return substr( $s, 0, -1 );
                } else {
@@ -1195,7 +1195,7 @@ class ParserTest {
         * @param $line Integer: the input line number, for reporting errors
         * @param $ignoreDuplicate Boolean: whether to silently ignore duplicate pages
         */
-       static public function addArticle( $name, $text, $line = 'unknown', $ignoreDuplicate = '' ) {
+       public static function addArticle( $name, $text, $line = 'unknown', $ignoreDuplicate = '' ) {
                global $wgCapitalLinks;
 
                $oldCapitalLinks = $wgCapitalLinks;
index 5a067c2..07f9867 100644 (file)
@@ -108,7 +108,7 @@ class Selenium {
                self::$url = $url;
        }
 
-       static public function getUrl() {
+       public static function getUrl() {
                return self::$url;
        }
 
index 6cbc1c7..8c21f21 100644 (file)
@@ -11,7 +11,7 @@ abstract class SeleniumTestSuite extends PHPUnit_Framework_TestSuite {
        const RESULT_OK = 2;
        const RESULT_ERROR = 3;
 
-       public abstract function addTests();
+       abstract public function addTests();
 
        public function setUp() {
                // Hack because because PHPUnit version 3.0.6 which is on prototype does not