Passed
Branch master (7b759d)
by Matthew
13:27
created
BeanStalkd/JobManager.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,8 +57,7 @@
 block discarded – undo
57 57
         if ($job->getStatus() === BaseJob::STATUS_SUCCESS) {
58 58
             $this->beanstalkd
59 59
                 ->delete($job);
60
-        }
61
-        else {
60
+        } else {
62 61
             $this->beanstalkd
63 62
                 ->bury($job);
64 63
         }
Please login to merge, or discard this patch.
Command/RunCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
         set_time_limit($processTimeout); // Set an hour timeout
69 69
 
70 70
         if ($jobId = $input->getOption('job_id')) {
71
-            return $this->runJobById($jobId);   // Run a single job
71
+            return $this->runJobById($jobId); // Run a single job
72 72
         }
73 73
 
74 74
         try {
Please login to merge, or discard this patch.
DependencyInjection/DtcQueueExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
         $container->setParameter('dtc_queue.job_class', $documentName);
24 24
 
25 25
         // Load Grid if Dtc\GridBundle Bundle is registered
26
-        $yamlLoader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
26
+        $yamlLoader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
27 27
 
28 28
         $yamlLoader->load('queue.yml');
29 29
         $yamlLoader->load('grid.yml');
Please login to merge, or discard this patch.
Documents/JobManager.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -179,8 +179,7 @@
 block discarded – undo
179 179
 
180 180
         if ($prioritize) {
181 181
             $qb->sort('priority', 'asc');
182
-        }
183
-        else {
182
+        } else {
184 183
             $qb->sort('when', 'asc');
185 184
         }
186 185
 
Please login to merge, or discard this patch.
EventDispatcher/EventDispatcher.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 
16 16
     public function hasListeners($eventName)
17 17
     {
18
-        if ( ! isset($this->listeners[$eventName])) {
18
+        if (!isset($this->listeners[$eventName])) {
19 19
             return false;
20 20
         }
21 21
 
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 
25 25
     public function dispatch($eventName, Event $event)
26 26
     {
27
-        if ( ! isset($this->listeners[$eventName])) {
27
+        if (!isset($this->listeners[$eventName])) {
28 28
             return;
29 29
         }
30 30
 
Please login to merge, or discard this patch.
Model/Job.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -259,8 +259,7 @@
 block discarded – undo
259 259
             }
260 260
 
261 261
             return true;
262
-        }
263
-        else {
262
+        } else {
264 263
             return !is_object($args);
265 264
         }
266 265
     }
Please login to merge, or discard this patch.
Model/Worker.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,8 +45,7 @@
 block discarded – undo
45 45
         if ($time) {
46 46
             $dateTime = new \DateTime();
47 47
             $dateTime->setTimestamp($time);
48
-        }
49
-        else {
48
+        } else {
50 49
             $dateTime = null;
51 50
         }
52 51
 
Please login to merge, or discard this patch.
Model/WorkerManager.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 				$this->logger->debug("No job to run");
52 52
 			}
53 53
 
54
-			return;        // no job to run
54
+			return; // no job to run
55 55
 		}
56 56
 
57 57
 		return $this->runJob($job);
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 			}
81 81
 
82 82
 			$job->setStatus(Job::STATUS_ERROR);
83
-			$job->setMessage($e->getMessage() . "\n" .$e->getTraceAsString());
83
+			$job->setMessage($e->getMessage() . "\n" . $e->getTraceAsString());
84 84
 		}
85 85
 
86 86
 		// save Job history
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,8 +73,7 @@
 block discarded – undo
73 73
 			// Job finshed successfuly... do we remove the job from database?
74 74
 			$job->setStatus(Job::STATUS_SUCCESS);
75 75
 			$job->setMessage(null);
76
-		}
77
-		catch (\Exception $e) {
76
+		} catch (\Exception $e) {
78 77
 			if ($this->logger) {
79 78
 				$this->logger->debug("Failed: {$job->getClassName()}->{$job->getMethod()}\n{$e->getMessage()}");
80 79
 			}
Please login to merge, or discard this patch.
RabbitMQ/JobManager.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,12 +15,12 @@
 block discarded – undo
15 15
 
16 16
     public function __construct(AMQPConnection $connection) {
17 17
         $this->connection = $connection;
18
-        $this->channel = $connection->channel();;
18
+        $this->channel = $connection->channel(); ;
19 19
     }
20 20
 
21 21
     public function save($job) {
22 22
         $queue = $job->getWorkerName();
23
-        $exchange = null; 	// User default exchange
23
+        $exchange = null; // User default exchange
24 24
 
25 25
         $this->channel->queue_declare($queue, false, true, false, false);
26 26
         $this->channel->exchange_declare($exchange, 'direct', false, true, false);
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,8 +67,7 @@
 block discarded – undo
67 67
         if ($job->getStatus() === BaseJob::STATUS_SUCCESS) {
68 68
             $this->beanstalkd
69 69
                 ->delete($job);
70
-        }
71
-        else {
70
+        } else {
72 71
             $this->beanstalkd
73 72
                 ->bury($job);
74 73
         }
Please login to merge, or discard this patch.