Test Failed
Pull Request — master (#53)
by
unknown
02:12
created
demo/check_status.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(empty($argv[1])) {
2
+if (empty($argv[1])) {
3 3
 	die('Specify the ID of a job to monitor the status of.');
4 4
 }
5 5
 
@@ -12,12 +12,12 @@  discard block
 block discarded – undo
12 12
 //Resque::setBackend('redis://user:[email protected]:3432/2');
13 13
 
14 14
 $status = new Resque_Job_Status($argv[1]);
15
-if(!$status->isTracking()) {
15
+if (!$status->isTracking()) {
16 16
 	die("Resque is not tracking the status of this job.\n");
17 17
 }
18 18
 
19
-echo "Tracking status of ".$argv[1].". Press [break] to stop.\n\n";
20
-while(true) {
21
-	fwrite(STDOUT, "Status of ".$argv[1]." is: ".$status->get()."\n");
19
+echo "Tracking status of " . $argv[1] . ". Press [break] to stop.\n\n";
20
+while (true) {
21
+	fwrite(STDOUT, "Status of " . $argv[1] . " is: " . $status->get() . "\n");
22 22
 	sleep(1);
23 23
 }
24 24
\ No newline at end of file
Please login to merge, or discard this patch.
demo/queue.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(empty($argv[1])) {
2
+if (empty($argv[1])) {
3 3
 	die('Specify the name of a job to add. e.g, php queue.php PHP_Job');
4 4
 }
5 5
 
@@ -23,4 +23,4 @@  discard block
 block discarded – undo
23 23
         $jobId = Resque::enqueue($argv[1], $argv[2], $args, true);	
24 24
 }
25 25
 
26
-echo "Queued job ".$jobId."\n\n";
26
+echo "Queued job " . $jobId . "\n\n";
Please login to merge, or discard this patch.
lib/Resque/Worker.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -532,7 +532,7 @@
 block discarded – undo
532 532
 			exec('WMIC path win32_process get Processid,Commandline | findstr resque | findstr /V findstr', $cmdOutput);
533 533
 			foreach ($cmdOutput as $line) {
534 534
 				$line = preg_replace('/\s+/m', ' ', $line);
535
-				list(,,$pids[]) = explode(' ', trim($line), 3);
535
+				list(,, $pids[]) = explode(' ', trim($line), 3);
536 536
 			}
537 537
 		} else {
538 538
 			exec('ps -A -o pid,args | grep [r]esque', $cmdOutput);
Please login to merge, or discard this patch.
lib/Resque/Job/Status.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 			'started' => time(),
65 65
 			'result'  => null,
66 66
 		);
67
-		Resque::redis()->set((string) $status, json_encode($statusPacket));
67
+		Resque::redis()->set((string)$status, json_encode($statusPacket));
68 68
 
69 69
 		return $status;
70 70
 	}
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 	 */
98 98
 	public function update($status, $result = null)
99 99
 	{
100
-		$status = (int) $status;
100
+		$status = (int)$status;
101 101
 
102 102
 		if (!$this->isTracking()) {
103 103
 			return;
Please login to merge, or discard this patch.
lib/Resque/Redis.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -190,12 +190,12 @@
 block discarded – undo
190 190
 
191 191
 		// Check the URI scheme
192 192
 		$validSchemes = array('redis', 'tcp');
193
-		if (isset($parts['scheme']) && ! in_array($parts['scheme'], $validSchemes)) {
193
+		if (isset($parts['scheme']) && !in_array($parts['scheme'], $validSchemes)) {
194 194
 			throw new \InvalidArgumentException("Invalid DSN. Supported schemes are " . implode(', ', $validSchemes));
195 195
 		}
196 196
 
197 197
 		// Allow simple 'hostname' format, which `parse_url` treats as a path, not host.
198
-		if (! isset($parts['host']) && isset($parts['path'])) {
198
+		if (!isset($parts['host']) && isset($parts['path'])) {
199 199
 			$parts['host'] = $parts['path'];
200 200
 			unset($parts['path']);
201 201
 		}
Please login to merge, or discard this patch.