From 27758b47be5e50492276c4a10483dad57ad76ee4 Mon Sep 17 00:00:00 2001 From: Stephen Craton Date: Thu, 18 Nov 2010 14:01:10 +0800 Subject: [PATCH] fixed to pass PHP strict standards --- lib/Resque/Failure.php | 4 ++-- lib/Resque/Stat.php | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/Resque/Failure.php b/lib/Resque/Failure.php index 56e0068..844e343 100644 --- a/lib/Resque/Failure.php +++ b/lib/Resque/Failure.php @@ -35,7 +35,7 @@ class Resque_Failure * * @return object Instance of backend object. */ - public function getBackend() + public static function getBackend() { if(self::$backend === null) { 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. */ - public function setBackend($backend) + public static function setBackend($backend) { self::$backend = $backend; } diff --git a/lib/Resque/Stat.php b/lib/Resque/Stat.php index 7956a4c..2805376 100644 --- a/lib/Resque/Stat.php +++ b/lib/Resque/Stat.php @@ -15,7 +15,7 @@ class Resque_Stat * @param string $stat The name of the statistic to get the stats for. * @return mixed Value of the statistic. */ - public function get($stat) + public static function get($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. * @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); } @@ -39,7 +39,7 @@ class Resque_Stat * @param int $by The amount to decrement the statistic by. * @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); } @@ -50,7 +50,7 @@ class Resque_Stat * @param string $stat The name of the statistic to delete. * @return boolean True if successful, false if not. */ - public function clear($stat) + public static function clear($stat) { return (bool)Resque::redis()->del('stat:' . $stat); }