r49578 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r49577‎ | r49578 | r49579 >
Date:22:08, 16 April 2009
Author:yaron
Status:deferred
Tags:
Comment:
Added 'static' declaration to all functions
Modified paths:
  • /trunk/extensions/SemanticResultFormats/SRF_ParserFunctions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticResultFormats/SRF_ParserFunctions.php
@@ -20,13 +20,13 @@
2121
2222 class SRFParserFunctions {
2323
24 - function registerFunctions( $parser ) {
 24+ static function registerFunctions( $parser ) {
2525 $parser->setFunctionHook('calendarstartdate', array('SRFParserFunctions','runCalendarStartDate'));
2626 $parser->setFunctionHook('calendarenddate', array('SRFParserFunctions','runCalendarEndDate'));
2727 return true;
2828 }
2929
30 - function languageGetMagic( &$magicWords, $langCode = "en" ) {
 30+ static function languageGetMagic( &$magicWords, $langCode = "en" ) {
3131 switch ( $langCode ) {
3232 default:
3333 $magicWords['calendarstartdate'] = array ( 0, 'calendarstartdate' );
@@ -35,14 +35,14 @@
3636 return true;
3737 }
3838
39 - function runCalendarStartDate(&$parser, $calendar_type = 'month', $calendar_start_day = null, $calendar_days = 7, $default_year = null, $default_month = null, $default_day = null) {
 39+ static function runCalendarStartDate(&$parser, $calendar_type = 'month', $calendar_start_day = null, $calendar_days = 7, $default_year = null, $default_month = null, $default_day = null) {
4040 if ($calendar_type == '') $calendar_type = 'month';
4141 list($lower_date, $upper_date, $query_date) =
4242 SRFParserFunctions::getBoundaryDates($calendar_type, $calendar_start_day, $calendar_days, $default_year, $default_month, $default_day);
4343 return date("Y", $lower_date) . '-' . date("m", $lower_date) . '-' . date("d", $lower_date);
4444 }
4545
46 - function runCalendarEndDate(&$parser, $calendar_type = 'month', $calendar_start_day = null, $calendar_days = 7, $default_year = null, $default_month = null, $default_day = null) {
 46+ static function runCalendarEndDate(&$parser, $calendar_type = 'month', $calendar_start_day = null, $calendar_days = 7, $default_year = null, $default_month = null, $default_day = null) {
4747 if ($calendar_type == '') $calendar_type = 'month';
4848 list($lower_date, $upper_date, $query_date) =
4949 SRFParserFunctions::getBoundaryDates($calendar_type, $calendar_start_day, $calendar_days, $default_year, $default_month, $default_day);

Status & tagging log