From f73f0659679ae2112f570539f5bfafc85bed1ba0 Mon Sep 17 00:00:00 2001 From: Marcos Cano Date: Thu, 22 Mar 2018 15:39:59 +0100 Subject: [PATCH] #479: Fix CS violations. --- .../DrupalExtension/Context/MinkContext.php | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/src/Drupal/DrupalExtension/Context/MinkContext.php b/src/Drupal/DrupalExtension/Context/MinkContext.php index 297952aa..612b0652 100644 --- a/src/Drupal/DrupalExtension/Context/MinkContext.php +++ b/src/Drupal/DrupalExtension/Context/MinkContext.php @@ -127,7 +127,7 @@ public function afterJavascriptStep($event) * * @Given I wait for AJAX to finish */ - public function iWaitForAjaxToFinish($event = NULL) + public function iWaitForAjaxToFinish($event = null) { $condition = <<getSession()->wait(1000 * $this->getMinkParameter('ajax_timeout'), $condition); if (!$result) { - if ($event) { - /** @var \Behat\Behat\Hook\Scope\BeforeStepScope $event */ - $event_data = ' ' . json_encode([ - 'name' => $event->getName(), - 'feature' => $event->getFeature()->getTitle(), - 'step' => $event->getStep()->getText(), - 'suite' => $event->getSuite()->getName(), - ]); - } - else { - $event_data = ''; - } - throw new \RuntimeException('Unable to complete AJAX request.' . $event_data); + if ($event) { + /** @var \Behat\Behat\Hook\Scope\BeforeStepScope $event */ + $event_data = ' ' . json_encode([ + 'name' => $event->getName(), + 'feature' => $event->getFeature()->getTitle(), + 'step' => $event->getStep()->getText(), + 'suite' => $event->getSuite()->getName(), + ]); + } else { + $event_data = ''; + } + throw new \RuntimeException('Unable to complete AJAX request.' . $event_data); } } /**