From 9d6575af1536990cffae5e2227872893760e024b Mon Sep 17 00:00:00 2001 From: umherirrender Date: Sat, 26 Jan 2013 21:03:52 +0100 Subject: [PATCH] The static declaration must come after the visibility declaration From phpcs Change-Id: Ieab0207f965630eda113abdc0259aa2eddcf5ca7 --- includes/WebRequest.php | 2 +- includes/interwiki/Interwiki.php | 4 ++-- includes/media/BitmapMetadataHandler.php | 6 +++--- includes/media/FormatMetadata.php | 2 +- includes/media/PNGMetadataExtractor.php | 2 +- includes/parser/Parser.php | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/includes/WebRequest.php b/includes/WebRequest.php index 68d22a8a2d..827b20e80e 100644 --- a/includes/WebRequest.php +++ b/includes/WebRequest.php @@ -76,7 +76,7 @@ class WebRequest { * * @return Array: Any query arguments found in path matches. */ - static public function getPathInfo( $want = 'all' ) { + public static function getPathInfo( $want = 'all' ) { global $wgUsePathInfo; // PATH_INFO is mangled due to http://bugs.php.net/bug.php?id=31892 // And also by Apache 2.x, double slashes are converted to single slashes. diff --git a/includes/interwiki/Interwiki.php b/includes/interwiki/Interwiki.php index 849eb86568..4003fa885f 100644 --- a/includes/interwiki/Interwiki.php +++ b/includes/interwiki/Interwiki.php @@ -50,7 +50,7 @@ class Interwiki { * @param string $prefix Interwiki prefix to use * @return bool Whether it exists */ - static public function isValidInterwiki( $prefix ) { + public static function isValidInterwiki( $prefix ) { $result = self::fetch( $prefix ); return (bool)$result; } @@ -61,7 +61,7 @@ class Interwiki { * @param string $prefix Interwiki prefix to use * @return Interwiki|null|bool */ - static public function fetch( $prefix ) { + public static function fetch( $prefix ) { global $wgContLang; if ( $prefix == '' ) { return null; diff --git a/includes/media/BitmapMetadataHandler.php b/includes/media/BitmapMetadataHandler.php index 2b04f78b53..55deef0fb8 100644 --- a/includes/media/BitmapMetadataHandler.php +++ b/includes/media/BitmapMetadataHandler.php @@ -190,7 +190,7 @@ class BitmapMetadataHandler { * @param $filename String full path to file * @return Array Array for storage in img_metadata. */ - static public function PNG ( $filename ) { + public static function PNG ( $filename ) { $showXMP = function_exists( 'xml_parser_create_ns' ); $meta = new self(); @@ -219,7 +219,7 @@ class BitmapMetadataHandler { * @param $filename string full path to file * @return Array metadata array */ - static public function GIF ( $filename ) { + public static function GIF ( $filename ) { $meta = new self(); $baseArray = GIFMetadataExtractor::getMetadata( $filename ); @@ -260,7 +260,7 @@ class BitmapMetadataHandler { * @throws MWException * @return Array The metadata. */ - static public function Tiff ( $filename ) { + public static function Tiff ( $filename ) { if ( file_exists( $filename ) ) { $byteOrder = self::getTiffByteOrder( $filename ); if ( !$byteOrder ) { diff --git a/includes/media/FormatMetadata.php b/includes/media/FormatMetadata.php index f2710f7e80..d44dfd1a33 100644 --- a/includes/media/FormatMetadata.php +++ b/includes/media/FormatMetadata.php @@ -1120,7 +1120,7 @@ class FormatMetadata { * @param $val String: The 8 digit news code. * @return string The human readable form */ - static private function convertNewsCode( $val ) { + private static function convertNewsCode( $val ) { if ( !preg_match( '/^\d{8}$/D', $val ) ) { // Not a valid news code. return $val; diff --git a/includes/media/PNGMetadataExtractor.php b/includes/media/PNGMetadataExtractor.php index 55f087ad2e..87f705ca22 100644 --- a/includes/media/PNGMetadataExtractor.php +++ b/includes/media/PNGMetadataExtractor.php @@ -417,7 +417,7 @@ class PNGMetadataExtractor { * @throws Exception if too big. * @return String The chunk. */ - static private function read( $fh, $size ) { + private static function read( $fh, $size ) { if ( $size > self::MAX_CHUNK_SIZE ) { throw new Exception( __METHOD__ . ': Chunk size of ' . $size . ' too big. Max size is: ' . self::MAX_CHUNK_SIZE ); diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 8f892a3ccf..3a79c5463a 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -606,7 +606,7 @@ class Parser { * * @return string */ - static public function getRandomString() { + public static function getRandomString() { return wfRandomString( 16 ); } -- 2.20.1