mirror of
https://github.com/idanoo/php-resque.git
synced 2024-11-22 00:11:53 +00:00
fixed to pass PHP strict standards
This commit is contained in:
parent
5fcd195db1
commit
27758b47be
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user