Completed
Push — master ( 0040e8...b35e00 )
by Tomasz
04:54
created
Gendoria/CommandQueueDoctrineDriverBundle/Worker/DoctrineWorkerRunner.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
         
126 126
         $this->connection->setTransactionIsolation(Connection::TRANSACTION_SERIALIZABLE);
127 127
         
128
-        while ($this->checkRunTimes() && $this->runIteration($output, (bool)$this->options['exit_if_empty'])) {
128
+        while ($this->checkRunTimes() && $this->runIteration($output, (bool) $this->options['exit_if_empty'])) {
129 129
             $this->logger->debug('Doctrine worker tick.');
130 130
         }
131 131
     }
@@ -225,11 +225,11 @@  discard block
 block discarded – undo
225 225
     {
226 226
         $platform = $this->connection->getDatabasePlatform();
227 227
         $sqlProto = "SELECT * "
228
-            . " FROM " . $platform->appendLockHint($this->tableName, LockMode::PESSIMISTIC_WRITE)
228
+            . " FROM ".$platform->appendLockHint($this->tableName, LockMode::PESSIMISTIC_WRITE)
229 229
             . " WHERE processed = ? AND pool = ? AND process_after <= ? "
230 230
             . " ORDER BY id ASC"
231 231
         ;
232
-        return $platform->modifyLimitQuery($sqlProto, 1) . " " . $platform->getWriteLockSQL();
232
+        return $platform->modifyLimitQuery($sqlProto, 1)." ".$platform->getWriteLockSQL();
233 233
     }
234 234
     
235 235
     /**
@@ -255,13 +255,13 @@  discard block
 block discarded – undo
255 255
     {
256 256
         $parameters = array(
257 257
             'processed' => true,
258
-            'id' => (int)$id,
258
+            'id' => (int) $id,
259 259
         );
260 260
         $types = array(
261 261
             'processed' => 'boolean',
262 262
             'id' => 'smallint'
263 263
         );
264
-        $updateSql = "UPDATE " . $this->tableName
264
+        $updateSql = "UPDATE ".$this->tableName
265 265
             . " SET processed = :processed"
266 266
             . " WHERE id = :id";
267 267
         if ($this->connection->executeUpdate($updateSql, $parameters, $types) !== 1) {
@@ -280,9 +280,9 @@  discard block
 block discarded – undo
280 280
     {
281 281
         $parameters = array(
282 282
             'processed' => false,
283
-            'failed_no' => (int)$failedRetries,
284
-            'id' => (int)$id,
285
-            'process_after' => new DateTime('@'.(time()+20*$failedRetries)),
283
+            'failed_no' => (int) $failedRetries,
284
+            'id' => (int) $id,
285
+            'process_after' => new DateTime('@'.(time()+20 * $failedRetries)),
286 286
         );
287 287
         $types = array(
288 288
             'processed' => 'boolean',
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
             'id' => 'smallint',
291 291
             'process_after' => 'datetime',
292 292
         );
293
-        $updateSql = "UPDATE " . $this->tableName
293
+        $updateSql = "UPDATE ".$this->tableName
294 294
             . " SET processed = :processed, failed_no = :failed_no, process_after = :process_after"
295 295
             . " WHERE id = :id";
296 296
         return $this->connection->executeUpdate($updateSql, $parameters, $types);
Please login to merge, or discard this patch.