r15497 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r15496‎ | r15497 | r15498 >
Date:15:08, 10 July 2006
Author:hashar
Status:old
Tags:
Comment:
static E_STRICT warnings
Modified paths:
  • /trunk/phase3/includes/LoadBalancer.php (modified) (history)
  • /trunk/phase3/includes/Parser.php (modified) (history)
  • /trunk/phase3/includes/Sanitizer.php (modified) (history)
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Sanitizer.php
@@ -920,8 +920,9 @@
921921 * @param string $text
922922 * @return string
923923 * @public
 924+ * @static
924925 */
925 - function decodeCharReferences( $text ) {
 926+ public static function decodeCharReferences( $text ) {
926927 return preg_replace_callback(
927928 MW_CHAR_REFS_REGEX,
928929 array( 'Sanitizer', 'decodeCharReferencesCallback' ),
@@ -932,7 +933,7 @@
933934 * @param string $matches
934935 * @return string
935936 */
936 - function decodeCharReferencesCallback( $matches ) {
 937+ static function decodeCharReferencesCallback( $matches ) {
937938 if( $matches[1] != '' ) {
938939 return Sanitizer::decodeEntity( $matches[1] );
939940 } elseif( $matches[2] != '' ) {
Index: trunk/phase3/includes/Title.php
@@ -108,7 +108,7 @@
109109 * @static
110110 * @access public
111111 */
112 - function newFromText( $text, $defaultNamespace = NS_MAIN ) {
 112+ public static function newFromText( $text, $defaultNamespace = NS_MAIN ) {
113113 $fname = 'Title::newFromText';
114114
115115 if( is_object( $text ) ) {
@@ -233,7 +233,7 @@
234234 * @static
235235 * @access public
236236 */
237 - function &makeTitle( $ns, $title ) {
 237+ public static function &makeTitle( $ns, $title ) {
238238 $t =& new Title();
239239 $t->mInterwiki = '';
240240 $t->mFragment = '';
Index: trunk/phase3/includes/Parser.php
@@ -4556,7 +4556,7 @@
45574557 * Get parser options
45584558 * @static
45594559 */
4560 - function newFromUser( &$user ) {
 4560+ static function newFromUser( &$user ) {
45614561 return new ParserOptions( $user );
45624562 }
45634563
Index: trunk/phase3/includes/LoadBalancer.php
@@ -50,7 +50,7 @@
5151 $this->mAllowLag = false;
5252 }
5353
54 - function newFromParams( $servers, $failFunction = false, $waitTimeout = 10 )
 54+ static function newFromParams( $servers, $failFunction = false, $waitTimeout = 10 )
5555 {
5656 $lb = new LoadBalancer;
5757 $lb->initialise( $servers, $failFunction, $waitTimeout );