phpcs: Normalize methods declarations to "[final abstract] [visibility]".

CodeSniffer sniff is:
  [abstract final] [<visibility>] [static] function
As declared by:
  PSR2.Methods.MethodDeclaration.StaticBeforeVisibility
in:
  https://github.com/wikimedia/mediawiki-tools-codesniffer/blob/master/MediaWiki/ruleset.xml


Change-Id: Ifabd289e8668019ed752bdd711b3b43a9c346336
This commit is contained in:
Antoine Musso 2013-02-12 22:32:09 +01:00 committed by Krinkle
parent f918245559
commit 6c35b02aa7
7 changed files with 17 additions and 17 deletions

View 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 );
}

View 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__ );

View 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__ );

View 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();

View file

@ -227,7 +227,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 );
}
@ -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;

View file

@ -106,7 +106,7 @@ class Selenium {
self::$url = $url;
}
static public function getUrl() {
public static function getUrl() {
return self::$url;
}

View 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