Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / drush / drush / tests / resources / modules / d8 / woot / src / Plugin / QueueWorker / WootRequeueException.php
index 6830e56d02f53963570f1de65611d1965bba68fc..5ee43fe9106bf605507d0bbcd50c9d1f07ac4a18 100644 (file)
@@ -14,20 +14,20 @@ use Drupal\Core\Queue\RequeueException;
  *   cron = {"time" = 60}
  * )
  */
-class WootRequeueException extends QueueWorkerBase {
+class WootRequeueException extends QueueWorkerBase
+{
 
   /**
    * {@inheritdoc}
    */
-  public function processItem($data) {
-    $state = \Drupal::state();
-    if (!$state->get('woot_requeue_exception')) {
-      $state->set('woot_requeue_exception', 1);
-      throw new RequeueException('I am not done yet!');
+    public function processItem($data)
+    {
+        $state = \Drupal::state();
+        if (!$state->get('woot_requeue_exception')) {
+            $state->set('woot_requeue_exception', 1);
+            throw new RequeueException('I am not done yet!');
+        } else {
+            $state->set('woot_requeue_exception', 2);
+        }
     }
-    else {
-      $state->set('woot_requeue_exception', 2);
-    }
-  }
-
 }