fixed to pass PHP strict standards

This commit is contained in:
Stephen Craton 2010-11-18 14:01:10 +08:00
parent 5fcd195db1
commit 27758b47be
2 changed files with 6 additions and 6 deletions

View File

@ -35,7 +35,7 @@ class Resque_Failure
* *
* @return object Instance of backend object. * @return object Instance of backend object.
*/ */
public function getBackend() public static function getBackend()
{ {
if(self::$backend === null) { if(self::$backend === null) {
require dirname(__FILE__) . '/Failure/Redis.php'; require dirname(__FILE__) . '/Failure/Redis.php';
@ -52,7 +52,7 @@ class Resque_Failure
* *
* @param string $backend The class name of the backend to pipe failures to. * @param string $backend The class name of the backend to pipe failures to.
*/ */
public function setBackend($backend) public static function setBackend($backend)
{ {
self::$backend = $backend; self::$backend = $backend;
} }

View File

@ -15,7 +15,7 @@ class Resque_Stat
* @param string $stat The name of the statistic to get the stats for. * @param string $stat The name of the statistic to get the stats for.
* @return mixed Value of the statistic. * @return mixed Value of the statistic.
*/ */
public function get($stat) public static function get($stat)
{ {
return (int)Resque::redis()->get('stat:' . $stat); return (int)Resque::redis()->get('stat:' . $stat);
} }
@ -27,7 +27,7 @@ class Resque_Stat
* @param int $by The amount to increment the statistic by. * @param int $by The amount to increment the statistic by.
* @return boolean True if successful, false if not. * @return boolean True if successful, false if not.
*/ */
public function incr($stat, $by = 1) public static function incr($stat, $by = 1)
{ {
return (bool)Resque::redis()->incrby('stat:' . $stat, $by); return (bool)Resque::redis()->incrby('stat:' . $stat, $by);
} }
@ -39,7 +39,7 @@ class Resque_Stat
* @param int $by The amount to decrement the statistic by. * @param int $by The amount to decrement the statistic by.
* @return boolean True if successful, false if not. * @return boolean True if successful, false if not.
*/ */
public function decr($stat, $by = 1) public static function decr($stat, $by = 1)
{ {
return (bool)Resque::redis()->decrby('stat:' . $stat, $by); return (bool)Resque::redis()->decrby('stat:' . $stat, $by);
} }
@ -50,7 +50,7 @@ class Resque_Stat
* @param string $stat The name of the statistic to delete. * @param string $stat The name of the statistic to delete.
* @return boolean True if successful, false if not. * @return boolean True if successful, false if not.
*/ */
public function clear($stat) public static function clear($stat)
{ {
return (bool)Resque::redis()->del('stat:' . $stat); return (bool)Resque::redis()->del('stat:' . $stat);
} }