Test Failed
Pull Request — master (#48)
by
unknown
07:49
created
demo/job.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 {
4 4
 	public function perform()
5 5
 	{
6
-        fwrite(STDOUT, 'Start job! -> ');
6
+		fwrite(STDOUT, 'Start job! -> ');
7 7
 		sleep(1);
8 8
 		fwrite(STDOUT, 'Job ended!' . PHP_EOL);
9 9
 	}
Please login to merge, or discard this patch.
demo/queue.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 if (empty($argv[2])) {
21 21
 	$jobId = Resque::enqueue('default', $argv[1], $args, true);
22 22
 } else {
23
-        $jobId = Resque::enqueue($argv[1], $argv[2], $args, true);	
23
+		$jobId = Resque::enqueue($argv[1], $argv[2], $args, true);	
24 24
 }
25 25
 
26 26
 echo "Queued job ".$jobId."\n\n";
Please login to merge, or discard this patch.
lib/Resque/Job/Factory.php 1 patch
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -3,30 +3,30 @@
 block discarded – undo
3 3
 class Resque_Job_Factory implements Resque_Job_FactoryInterface
4 4
 {
5 5
 
6
-    /**
7
-     * @param $className
8
-     * @param array $args
9
-     * @param $queue
10
-     * @return Resque_JobInterface
11
-     * @throws \Resque_Exception
12
-     */
13
-    public function create($className, $args, $queue)
14
-    {
15
-        if (!class_exists($className)) {
16
-            throw new Resque_Exception(
17
-                'Could not find job class ' . $className . '.'
18
-            );
19
-        }
6
+	/**
7
+	 * @param $className
8
+	 * @param array $args
9
+	 * @param $queue
10
+	 * @return Resque_JobInterface
11
+	 * @throws \Resque_Exception
12
+	 */
13
+	public function create($className, $args, $queue)
14
+	{
15
+		if (!class_exists($className)) {
16
+			throw new Resque_Exception(
17
+				'Could not find job class ' . $className . '.'
18
+			);
19
+		}
20 20
 
21
-        if (!method_exists($className, 'perform')) {
22
-            throw new Resque_Exception(
23
-                'Job class ' . $className . ' does not contain a perform method.'
24
-            );
25
-        }
21
+		if (!method_exists($className, 'perform')) {
22
+			throw new Resque_Exception(
23
+				'Job class ' . $className . ' does not contain a perform method.'
24
+			);
25
+		}
26 26
 
27
-        $instance = new $className;
28
-        $instance->args = $args;
29
-        $instance->queue = $queue;
30
-        return $instance;
31
-    }
27
+		$instance = new $className;
28
+		$instance->args = $args;
29
+		$instance->queue = $queue;
30
+		return $instance;
31
+	}
32 32
 }
Please login to merge, or discard this patch.
lib/Resque/Job/Status.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -14,8 +14,8 @@  discard block
 block discarded – undo
14 14
 	const STATUS_COMPLETE = 4;
15 15
 
16 16
 	/**
17
- 	 * @var string The prefix of the job status id.
18
- 	 */
17
+	 * @var string The prefix of the job status id.
18
+	 */
19 19
  	private $prefix;
20 20
 
21 21
 	/**
@@ -143,33 +143,33 @@  discard block
 block discarded – undo
143 143
 	}
144 144
 
145 145
 	/**
146
- 	 * Fetch the last update timestamp of the job being monitored.
147
- 	 *
148
- 	 * @return mixed False if the job is not being monitored, otherwise the
146
+	 * Fetch the last update timestamp of the job being monitored.
147
+	 *
148
+	 * @return mixed False if the job is not being monitored, otherwise the
149 149
 	 *  update timestamp.
150
- 	 */
150
+	 */
151 151
 	public function updated()
152 152
 	{
153 153
 		return $this->fetch('updated');
154 154
  	}
155 155
 
156 156
 	/**
157
- 	 * Fetch the start timestamp of the job being monitored.
158
- 	 *
159
- 	 * @return mixed False if the job is not being monitored, otherwise the
157
+	 * Fetch the start timestamp of the job being monitored.
158
+	 *
159
+	 * @return mixed False if the job is not being monitored, otherwise the
160 160
 	 *  start timestamp.
161
- 	 */
161
+	 */
162 162
 	public function started()
163 163
 	{
164 164
 		return $this->fetch('started');
165 165
  	}
166 166
 
167 167
 	/**
168
- 	 * Fetch the result of the job being monitored.
169
- 	 *
170
- 	 * @return mixed False if the job is not being monitored, otherwise the result
171
- 	 * 	as mixed
172
- 	 */
168
+	 * Fetch the result of the job being monitored.
169
+	 *
170
+	 * @return mixed False if the job is not being monitored, otherwise the result
171
+	 * 	as mixed
172
+	 */
173 173
 	public function result()
174 174
 	{
175 175
 		return $this->fetch('result');
@@ -194,11 +194,11 @@  discard block
 block discarded – undo
194 194
 	}
195 195
 
196 196
 	/**
197
-	* Fetch a value from the status packet for the job being monitored.
198
-	*
199
-	* @return mixed False if the status is not being monitored, otherwise the
200
-	*  requested value from the status packet.
201
-	*/
197
+	 * Fetch a value from the status packet for the job being monitored.
198
+	 *
199
+	 * @return mixed False if the status is not being monitored, otherwise the
200
+	 *  requested value from the status packet.
201
+	 */
202 202
 	protected function fetch($value = null)
203 203
 	{
204 204
 		if(!$this->isTracking()) {
Please login to merge, or discard this patch.
lib/Resque/Redis.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -98,10 +98,10 @@  discard block
 block discarded – undo
98 98
 	 */
99 99
 	public static function prefix($namespace)
100 100
 	{
101
-	    if (substr($namespace, -1) !== ':' && $namespace != '') {
102
-	        $namespace .= ':';
103
-	    }
104
-	    self::$defaultNamespace = $namespace;
101
+		if (substr($namespace, -1) !== ':' && $namespace != '') {
102
+			$namespace .= ':';
103
+		}
104
+		self::$defaultNamespace = $namespace;
105 105
 	}
106 106
 
107 107
 	/**
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 	 *                      DSN-supplied value will be used instead and this parameter is ignored.
111 111
 	 * @param object $client Optional Credis_Cluster or Credis_Client instance instantiated by you
112 112
 	 */
113
-    public function __construct($server, $database = null, $client = null)
113
+	public function __construct($server, $database = null, $client = null)
114 114
 	{
115 115
 		try {
116 116
 			if (is_object($client)) {
@@ -258,16 +258,16 @@  discard block
 block discarded – undo
258 258
 
259 259
 	public static function getPrefix()
260 260
 	{
261
-	    return self::$defaultNamespace;
261
+		return self::$defaultNamespace;
262 262
 	}
263 263
 
264 264
 	public static function removePrefix($string)
265 265
 	{
266
-	    $prefix=self::getPrefix();
266
+		$prefix=self::getPrefix();
267 267
 
268
-	    if (substr($string, 0, strlen($prefix)) == $prefix) {
269
-	        $string = substr($string, strlen($prefix), strlen($string) );
270
-	    }
271
-	    return $string;
268
+		if (substr($string, 0, strlen($prefix)) == $prefix) {
269
+			$string = substr($string, strlen($prefix), strlen($string) );
270
+		}
271
+		return $string;
272 272
 	}
273 273
 }
Please login to merge, or discard this patch.
lib/ResqueScheduler.php 1 patch
Indentation   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -91,59 +91,59 @@
 block discarded – undo
91 91
 		return Resque::redis()->llen('delayed:' . $timestamp, $timestamp);
92 92
 	}
93 93
 
94
-    /**
95
-     * Remove a delayed job from the queue
96
-     *
97
-     * note: you must specify exactly the same
98
-     * queue, class and arguments that you used when you added
99
-     * to the delayed queue
100
-     *
101
-     * also, this is an expensive operation because all delayed keys have tobe
102
-     * searched
103
-     *
104
-     * @param $queue
105
-     * @param $class
106
-     * @param $args
107
-     * @return int number of jobs that were removed
108
-     */
109
-    public static function removeDelayed($queue, $class, $args)
110
-    {
111
-       $destroyed=0;
112
-       $item=json_encode(self::jobToHash($queue, $class, $args));
113
-       $redis=Resque::redis();
94
+	/**
95
+	 * Remove a delayed job from the queue
96
+	 *
97
+	 * note: you must specify exactly the same
98
+	 * queue, class and arguments that you used when you added
99
+	 * to the delayed queue
100
+	 *
101
+	 * also, this is an expensive operation because all delayed keys have tobe
102
+	 * searched
103
+	 *
104
+	 * @param $queue
105
+	 * @param $class
106
+	 * @param $args
107
+	 * @return int number of jobs that were removed
108
+	 */
109
+	public static function removeDelayed($queue, $class, $args)
110
+	{
111
+	   $destroyed=0;
112
+	   $item=json_encode(self::jobToHash($queue, $class, $args));
113
+	   $redis=Resque::redis();
114 114
 
115
-       foreach($redis->keys('delayed:*') as $key)
116
-       {
117
-           $key=$redis->removePrefix($key);
118
-           $destroyed+=$redis->lrem($key,0,$item);
119
-       }
115
+	   foreach($redis->keys('delayed:*') as $key)
116
+	   {
117
+		   $key=$redis->removePrefix($key);
118
+		   $destroyed+=$redis->lrem($key,0,$item);
119
+	   }
120 120
 
121
-       return $destroyed;
122
-    }
121
+	   return $destroyed;
122
+	}
123 123
 
124
-    /**
125
-     * removed a delayed job queued for a specific timestamp
126
-     *
127
-     * note: you must specify exactly the same
128
-     * queue, class and arguments that you used when you added
129
-     * to the delayed queue
130
-     *
131
-     * @param $timestamp
132
-     * @param $queue
133
-     * @param $class
134
-     * @param $args
135
-     * @return mixed
136
-     */
137
-    public static function removeDelayedJobFromTimestamp($timestamp, $queue, $class, $args)
138
-    {
139
-        $key = 'delayed:' . self::getTimestamp($timestamp);
140
-        $item = json_encode(self::jobToHash($queue, $class, $args));
141
-        $redis = Resque::redis();
142
-        $count = $redis->lrem($key, 0, $item);
143
-        self::cleanupTimestamp($key, $timestamp);
124
+	/**
125
+	 * removed a delayed job queued for a specific timestamp
126
+	 *
127
+	 * note: you must specify exactly the same
128
+	 * queue, class and arguments that you used when you added
129
+	 * to the delayed queue
130
+	 *
131
+	 * @param $timestamp
132
+	 * @param $queue
133
+	 * @param $class
134
+	 * @param $args
135
+	 * @return mixed
136
+	 */
137
+	public static function removeDelayedJobFromTimestamp($timestamp, $queue, $class, $args)
138
+	{
139
+		$key = 'delayed:' . self::getTimestamp($timestamp);
140
+		$item = json_encode(self::jobToHash($queue, $class, $args));
141
+		$redis = Resque::redis();
142
+		$count = $redis->lrem($key, 0, $item);
143
+		self::cleanupTimestamp($key, $timestamp);
144 144
 
145
-        return $count;
146
-    }
145
+		return $count;
146
+	}
147 147
 	
148 148
 	/**
149 149
 	 * Generate hash of all job properties to be saved in the scheduled queue.
Please login to merge, or discard this patch.
lib/ResqueScheduler/Worker.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -36,13 +36,13 @@
 block discarded – undo
36 36
 	private $paused = false;
37 37
 
38 38
 	/**
39
-	* The primary loop for a worker.
40
-	*
41
-	* Every $interval (seconds), the scheduled queue will be checked for jobs
42
-	* that should be pushed to Resque.
43
-	*
44
-	* @param int $interval How often to check schedules.
45
-	*/
39
+	 * The primary loop for a worker.
40
+	 *
41
+	 * Every $interval (seconds), the scheduled queue will be checked for jobs
42
+	 * that should be pushed to Resque.
43
+	 *
44
+	 * @param int $interval How often to check schedules.
45
+	 */
46 46
 	public function work($interval = null)
47 47
 	{
48 48
 		if ($interval !== null) {
Please login to merge, or discard this patch.
lib/Resque/Worker.php 1 patch
Indentation   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -17,8 +17,8 @@  discard block
 block discarded – undo
17 17
 	private static $processPrefix = 'resque';
18 18
 
19 19
 	/**
20
-	* @var LoggerInterface Logging object that impliments the PSR-3 LoggerInterface
21
-	*/
20
+	 * @var LoggerInterface Logging object that impliments the PSR-3 LoggerInterface
21
+	 */
22 22
 	public $logger;
23 23
 
24 24
 	/**
@@ -61,30 +61,30 @@  discard block
 block discarded – undo
61 61
 	 */
62 62
 	private $child = null;
63 63
 
64
-    /**
65
-     * Instantiate a new worker, given a list of queues that it should be working
66
-     * on. The list of queues should be supplied in the priority that they should
67
-     * be checked for jobs (first come, first served)
68
-     *
69
-     * Passing a single '*' allows the worker to work on all queues in alphabetical
70
-     * order. You can easily add new queues dynamically and have them worked on using
71
-     * this method.
72
-     *
73
-     * @param string|array $queues String with a single queue name, array with multiple.
74
-     */
75
-    public function __construct($queues)
76
-    {
77
-        $this->logger = new Resque_Log();
64
+	/**
65
+	 * Instantiate a new worker, given a list of queues that it should be working
66
+	 * on. The list of queues should be supplied in the priority that they should
67
+	 * be checked for jobs (first come, first served)
68
+	 *
69
+	 * Passing a single '*' allows the worker to work on all queues in alphabetical
70
+	 * order. You can easily add new queues dynamically and have them worked on using
71
+	 * this method.
72
+	 *
73
+	 * @param string|array $queues String with a single queue name, array with multiple.
74
+	 */
75
+	public function __construct($queues)
76
+	{
77
+		$this->logger = new Resque_Log();
78 78
 
79
-        if(!is_array($queues)) {
80
-            $queues = array($queues);
81
-        }
79
+		if(!is_array($queues)) {
80
+			$queues = array($queues);
81
+		}
82 82
 
83
-        $this->queues = $queues;
84
-        $this->hostname = php_uname('n');
83
+		$this->queues = $queues;
84
+		$this->hostname = php_uname('n');
85 85
 
86
-        $this->id = $this->hostname . ':'.getmypid() . ':' . implode(',', $this->queues);
87
-    }
86
+		$this->id = $this->hostname . ':'.getmypid() . ':' . implode(',', $this->queues);
87
+	}
88 88
 
89 89
 	/**
90 90
 	 * Set the process prefix of the workers to the given prefix string.
@@ -166,9 +166,9 @@  discard block
 block discarded – undo
166 166
 		$this->updateProcLine('Starting');
167 167
 		$this->startup();
168 168
 
169
-        if(function_exists('pcntl_signal_dispatch')) {
170
-            pcntl_signal_dispatch();
171
-        }
169
+		if(function_exists('pcntl_signal_dispatch')) {
170
+			pcntl_signal_dispatch();
171
+		}
172 172
 
173 173
 		while(true) {
174 174
 			if($this->shutdown) {
@@ -177,14 +177,14 @@  discard block
 block discarded – undo
177 177
 
178 178
 			// is redis still alive?
179 179
 			try {
180
-			    if (!$this->paused && Resque::redis()->ping() === false) {
181
-			        throw new CredisException('redis ping() failed');
182
-			    }
180
+				if (!$this->paused && Resque::redis()->ping() === false) {
181
+					throw new CredisException('redis ping() failed');
182
+				}
183 183
 			} catch (CredisException $e) {
184
-			    $this->logger->log(Psr\Log\LogLevel::ERROR, 'redis went away. trying to reconnect');
185
-			    Resque::$redis = null;
186
-			    usleep($interval * 1000000);
187
-			    continue;
184
+				$this->logger->log(Psr\Log\LogLevel::ERROR, 'redis went away. trying to reconnect');
185
+				Resque::$redis = null;
186
+				usleep($interval * 1000000);
187
+				continue;
188 188
 			}
189 189
 
190 190
 			// Attempt to find and reserve a job
@@ -259,8 +259,8 @@  discard block
 block discarded – undo
259 259
 				// Wait until the child process finishes before continuing
260 260
 				while (pcntl_wait($status, WNOHANG) === 0) {
261 261
 					if(function_exists('pcntl_signal_dispatch')) {
262
-			            pcntl_signal_dispatch();
263
-			        }
262
+						pcntl_signal_dispatch();
263
+					}
264 264
 
265 265
 					// Pause for a half a second to conserve system resources
266 266
 					usleep(500000);
@@ -336,11 +336,11 @@  discard block
 block discarded – undo
336 336
 		}
337 337
 
338 338
 		if($blocking === true) {
339
-		    if(empty($queues)){
340
-                $this->logger->log(Psr\Log\LogLevel::INFO, 'No queue was found, sleeping for {interval}', array('interval' => $timeout));
341
-                usleep($timeout * 1000000);
342
-                return false;
343
-            }
339
+			if(empty($queues)){
340
+				$this->logger->log(Psr\Log\LogLevel::INFO, 'No queue was found, sleeping for {interval}', array('interval' => $timeout));
341
+				usleep($timeout * 1000000);
342
+				return false;
343
+			}
344 344
 			$job = Resque_Job::reserveBlocking($queues, $timeout);
345 345
 			if($job) {
346 346
 				$this->logger->log(Psr\Log\LogLevel::INFO, 'Found job on {queue}', array('queue' => $job->queue));
Please login to merge, or discard this patch.
lib/Resque.php 1 patch
Indentation   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 {
11 11
 	const VERSION = '1.2';
12 12
 
13
-    const DEFAULT_INTERVAL = 5;
13
+	const DEFAULT_INTERVAL = 5;
14 14
 
15 15
 	/**
16 16
 	 * @var Resque_Redis Instance of Resque_Redis that talks to redis or 
@@ -29,9 +29,9 @@  discard block
 block discarded – undo
29 29
 	 */
30 30
 	protected static $redisDatabase = 0;
31 31
 
32
-    /**
33
-     * @var string auth of Redis database
34
-     */
32
+	/**
33
+	 * @var string auth of Redis database
34
+	 */
35 35
 	protected static $auth;
36 36
 
37 37
 	/**
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	 *                      a nested array of servers with host/port pairs or 
45 45
 	 *                      external Redis connection object.
46 46
 	 * @param int $database
47
-     * @param string $auth
47
+	 * @param string $auth
48 48
 	 */
49 49
 	public static function setBackend($server, $database = 0, $auth = null)
50 50
 	{
@@ -67,16 +67,16 @@  discard block
 block discarded – undo
67 67
 		}
68 68
 
69 69
 		if (is_object(self::$redisServer)) {
70
-            		return self::$redisServer;
71
-        	} elseif (is_callable(self::$redisServer)) {
70
+					return self::$redisServer;
71
+			} elseif (is_callable(self::$redisServer)) {
72 72
 			self::$redis = call_user_func(self::$redisServer, self::$redisDatabase);
73 73
 		} else {
74 74
 			self::$redis = new Resque_Redis(self::$redisServer, self::$redisDatabase);
75 75
 		}
76 76
 
77 77
 		if (!empty(self::$auth)) {
78
-            self::$redis->auth(self::$auth);
79
-        }
78
+			self::$redis->auth(self::$auth);
79
+		}
80 80
 
81 81
 		return self::$redis;
82 82
 	}
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 	 */
139 139
 	public static function pop($queue)
140 140
 	{
141
-        $item = self::redis()->lpop('queue:' . $queue);
141
+		$item = self::redis()->lpop('queue:' . $queue);
142 142
 
143 143
 		if(!$item) {
144 144
 			return;
@@ -156,11 +156,11 @@  discard block
 block discarded – undo
156 156
 	 */
157 157
 	public static function dequeue($queue, $items = Array())
158 158
 	{
159
-	    if(count($items) > 0) {
159
+		if(count($items) > 0) {
160 160
 			return self::removeItems($queue, $items);
161
-	    } else {
161
+		} else {
162 162
 			return self::removeList($queue);
163
-	    }
163
+		}
164 164
 	}
165 165
 
166 166
 	/**
@@ -171,9 +171,9 @@  discard block
 block discarded – undo
171 171
 	 */
172 172
 	public static function removeQueue($queue)
173 173
 	{
174
-	    $num = self::removeList($queue);
175
-	    self::redis()->srem('queues', $queue);
176
-	    return $num;
174
+		$num = self::removeList($queue);
175
+		self::redis()->srem('queues', $queue);
176
+		return $num;
177 177
 	}
178 178
 
179 179
 	/**
@@ -186,28 +186,28 @@  discard block
 block discarded – undo
186 186
 	 */
187 187
 	public static function blpop(array $queues, $timeout)
188 188
 	{
189
-	    $list = array();
190
-	    foreach($queues AS $queue) {
189
+		$list = array();
190
+		foreach($queues AS $queue) {
191 191
 		$list[] = 'queue:' . $queue;
192
-	    }
192
+		}
193 193
 
194
-	    $item = self::redis()->blpop($list, (int)$timeout);
194
+		$item = self::redis()->blpop($list, (int)$timeout);
195 195
 
196
-	    if(!$item) {
196
+		if(!$item) {
197 197
 		return;
198
-	    }
198
+		}
199 199
 
200
-	    /**
201
-	     * Normally the Resque_Redis class returns queue names without the prefix
202
-	     * But the blpop is a bit different. It returns the name as prefix:queue:name
203
-	     * So we need to strip off the prefix:queue: part
204
-	     */
205
-	    $queue = substr($item[0], strlen(self::redis()->getPrefix() . 'queue:'));
200
+		/**
201
+		 * Normally the Resque_Redis class returns queue names without the prefix
202
+		 * But the blpop is a bit different. It returns the name as prefix:queue:name
203
+		 * So we need to strip off the prefix:queue: part
204
+		 */
205
+		$queue = substr($item[0], strlen(self::redis()->getPrefix() . 'queue:'));
206 206
 
207
-	    return array(
207
+		return array(
208 208
 		'queue'   => $queue,
209 209
 		'payload' => json_decode($item[1], true)
210
-	    );
210
+		);
211 211
 	}
212 212
 
213 213
 	/**
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
 		while (!$finished) {
336 336
 			$string = self::redis()->rpoplpush($requeueQueue, self::redis()->getPrefix() .$originalQueue);
337 337
 			if (empty($string)) {
338
-			    $finished = true;
338
+				$finished = true;
339 339
 			}
340 340
 		}
341 341
 
@@ -358,29 +358,29 @@  discard block
 block discarded – undo
358 358
 	 */
359 359
 	private static function matchItem($string, $items)
360 360
 	{
361
-	    $decoded = json_decode($string, true);
361
+		$decoded = json_decode($string, true);
362 362
 
363
-	    foreach($items as $key => $val) {
363
+		foreach($items as $key => $val) {
364 364
 			# class name only  ex: item[0] = ['class']
365 365
 			if (is_numeric($key)) {
366
-			    if($decoded['class'] == $val) {
366
+				if($decoded['class'] == $val) {
367 367
 					return true;
368
-			    }
368
+				}
369 369
 			# class name with args , example: item[0] = ['class' => {'foo' => 1, 'bar' => 2}]
370 370
 			} elseif (is_array($val)) {
371
-			    $decodedArgs = (array)$decoded['args'][0];
372
-			    if ($decoded['class'] == $key &&
371
+				$decodedArgs = (array)$decoded['args'][0];
372
+				if ($decoded['class'] == $key &&
373 373
 					count($decodedArgs) > 0 && count(array_diff($decodedArgs, $val)) == 0) {
374 374
 					return true;
375 375
 				}
376 376
 			# class name with ID, example: item[0] = ['class' => 'id']
377 377
 			} else {
378
-			    if ($decoded['class'] == $key && $decoded['id'] == $val) {
378
+				if ($decoded['class'] == $key && $decoded['id'] == $val) {
379 379
 					return true;
380
-			    }
380
+				}
381 381
 			}
382
-	    }
383
-	    return false;
382
+		}
383
+		return false;
384 384
 	}
385 385
 
386 386
 	/**
@@ -393,9 +393,9 @@  discard block
 block discarded – undo
393 393
 	 */
394 394
 	private static function removeList($queue)
395 395
 	{
396
-	    $counter = self::size($queue);
397
-	    $result = self::redis()->del('queue:' . $queue);
398
-	    return ($result == 1) ? $counter : 0;
396
+		$counter = self::size($queue);
397
+		$result = self::redis()->del('queue:' . $queue);
398
+		return ($result == 1) ? $counter : 0;
399 399
 	}
400 400
 
401 401
 	/*
Please login to merge, or discard this patch.