Completed
Push — master ( 3f24d7...0040e8 )
by Tomasz
06:15
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
     }
@@ -204,11 +204,11 @@  discard block
 block discarded – undo
204 204
         try {
205 205
             $this->connection->beginTransaction();
206 206
             $sqlProto = "SELECT * "
207
-                . " FROM " . $platform->appendLockHint($this->tableName, LockMode::PESSIMISTIC_WRITE)
207
+                . " FROM ".$platform->appendLockHint($this->tableName, LockMode::PESSIMISTIC_WRITE)
208 208
                 . " WHERE processed = ? AND pool = ? AND process_after <= ? "
209 209
                 . " ORDER BY id ASC"
210 210
             ;
211
-            $sql = $platform->modifyLimitQuery($sqlProto, 1) . " " . $platform->getWriteLockSQL();
211
+            $sql = $platform->modifyLimitQuery($sqlProto, 1)." ".$platform->getWriteLockSQL();
212 212
             $row = $this->connection->fetchAssoc($sql, array(0, $this->pool, new DateTime()), array('integer', 'string', 'datetime'));
213 213
 
214 214
             if (empty($row)) {
@@ -253,13 +253,13 @@  discard block
 block discarded – undo
253 253
     {
254 254
         $parameters = array(
255 255
             'processed' => true,
256
-            'id' => (int)$id,
256
+            'id' => (int) $id,
257 257
         );
258 258
         $types = array(
259 259
             'processed' => 'boolean',
260 260
             'id' => 'smallint'
261 261
         );
262
-        $updateSql = "UPDATE " . $this->tableName
262
+        $updateSql = "UPDATE ".$this->tableName
263 263
             . " SET processed = :processed"
264 264
             . " WHERE id = :id";
265 265
         return $this->connection->executeUpdate($updateSql, $parameters, $types);
@@ -276,9 +276,9 @@  discard block
 block discarded – undo
276 276
     {
277 277
         $parameters = array(
278 278
             'processed' => false,
279
-            'failed_no' => (int)$failedRetries,
280
-            'id' => (int)$id,
281
-            'process_after' => new DateTime('@'.(time()+20*$failedRetries)),
279
+            'failed_no' => (int) $failedRetries,
280
+            'id' => (int) $id,
281
+            'process_after' => new DateTime('@'.(time()+20 * $failedRetries)),
282 282
         );
283 283
         $types = array(
284 284
             'processed' => 'boolean',
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
             'id' => 'smallint',
287 287
             'process_after' => 'datetime',
288 288
         );
289
-        $updateSql = "UPDATE " . $this->tableName
289
+        $updateSql = "UPDATE ".$this->tableName
290 290
             . " SET processed = :processed, failed_no = :failed_no, process_after = :process_after"
291 291
             . " WHERE id = :id";
292 292
         return $this->connection->executeUpdate($updateSql, $parameters, $types);
Please login to merge, or discard this patch.