From: Antoine Musso Date: Thu, 10 Mar 2011 20:24:04 +0000 (+0000) Subject: Makes MediaWikiProvide methods static X-Git-Tag: 1.31.0-rc.0~31523 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/journal.php?a=commitdiff_plain;h=187575aa4730d26fe51f73d84e281f4ffb1f9f51;p=lhc%2Fweb%2Fwiklou.git Makes MediaWikiProvide methods static Follow up and revert r82369 which used dynamic calls --- diff --git a/tests/phpunit/includes/Providers.php b/tests/phpunit/includes/Providers.php index 2d041eadef..02898673de 100644 --- a/tests/phpunit/includes/Providers.php +++ b/tests/phpunit/includes/Providers.php @@ -11,7 +11,7 @@ class MediaWikiProvide { /* provide an array of numbers from 1 up to @param $num */ - private function createProviderUpTo( $num ) { + private static function createProviderUpTo( $num ) { $ret = array(); for( $i=1; $i<=$num;$i++ ) { $ret[] = array( $i ); @@ -20,20 +20,20 @@ class MediaWikiProvide { } /* array of months numbers (as an integer) */ - public function Months() { - return $this->createProviderUpTo( 12 ); + public static function Months() { + return self::createProviderUpTo( 12 ); } /* array of days numbers (as an integer) */ - public function Days() { - return $this->createProviderUpTo( 31 ); + public static function Days() { + return self::createProviderUpTo( 31 ); } - public function DaysMonths() { + public static function DaysMonths() { $ret = array(); - $months = $this->Months(); - $days = $this->Days(); + $months = self::Months(); + $days = self::Days(); foreach( $months as $month) { foreach( $days as $day ) { $ret[] = array( $day[0], $month[0] );