diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-04-09 13:53:40 +0200 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-04-09 13:54:22 +0200 |
commit | afbd9c4e6ed834e713039f2cff88ba3eec03dadb (patch) | |
tree | 7d8721cf8fc0329d6b750db63798de67a162b090 /tests/acceptance | |
parent | 19e97e86c69ab128191439d6a17dacb5a630cf98 (diff) | |
download | nextcloud-server-afbd9c4e6ed834e713039f2cff88ba3eec03dadb.tar.gz nextcloud-server-afbd9c4e6ed834e713039f2cff88ba3eec03dadb.zip |
Unify function spacing to PSR2 recommendation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests/acceptance')
6 files changed, 18 insertions, 18 deletions
diff --git a/tests/acceptance/features/bootstrap/SettingsContext.php b/tests/acceptance/features/bootstrap/SettingsContext.php index 5f9a724e771..ccc010e38e9 100644 --- a/tests/acceptance/features/bootstrap/SettingsContext.php +++ b/tests/acceptance/features/bootstrap/SettingsContext.php @@ -204,7 +204,7 @@ class SettingsContext implements Context, ActorAwareInterface { $actor = $this->actor; - $tagFoundInDropdownCallback = function() use($actor, $tag) { + $tagFoundInDropdownCallback = function () use ($actor, $tag) { // Open the dropdown to look for the tag. $actor->find(self::systemTagsSelectTagButton())->click(); diff --git a/tests/acceptance/features/bootstrap/ThemingAppContext.php b/tests/acceptance/features/bootstrap/ThemingAppContext.php index 79d140b2694..e52c1c86b03 100644 --- a/tests/acceptance/features/bootstrap/ThemingAppContext.php +++ b/tests/acceptance/features/bootstrap/ThemingAppContext.php @@ -93,7 +93,7 @@ class ThemingAppContext implements Context, ActorAwareInterface { $actor = $this->actor; - $colorSelectorLoadedCallback = function() use($actor) { + $colorSelectorLoadedCallback = function () use ($actor) { $colorSelectorValue = $this->getRGBArray($actor->getSession()->evaluateScript("return $('#theming-color')[0].value;")); $inputBgColor = $this->getRGBArray($actor->getSession()->evaluateScript("return $('#theming-color').css('background-color');")); if ($colorSelectorValue == $inputBgColor) { @@ -108,7 +108,7 @@ class ThemingAppContext implements Context, ActorAwareInterface { } } - private function getRGBArray ($color) { + private function getRGBArray($color) { if (preg_match("/rgb\(\s*(\d+),\s*(\d+),\s*(\d+)\)/", $color, $matches)) { // Already an RGB (R, G, B) color // Convert from "rgb(R, G, B)" string to RGB array @@ -128,7 +128,7 @@ class ThemingAppContext implements Context, ActorAwareInterface { * @Then I see that the header color is eventually :color */ public function iSeeThatTheHeaderColorIsEventually($color) { - $headerColorMatchesCallback = function() use($color) { + $headerColorMatchesCallback = function () use ($color) { $headerColor = $this->actor->getSession()->evaluateScript("return $('#header').css('background-color');"); $headerColor = $this->getRGBArray($headerColor); $color = $this->getRGBArray($color); @@ -149,7 +149,7 @@ class ThemingAppContext implements Context, ActorAwareInterface { $actor = $this->actor; - $savedStatusMessageShownCallback = function() use($actor) { + $savedStatusMessageShownCallback = function () use ($actor) { if ($actor->find(self::statusMessage())->getText() !== "Saved") { return false; } diff --git a/tests/acceptance/features/bootstrap/WaitFor.php b/tests/acceptance/features/bootstrap/WaitFor.php index 038de3e42c2..0b79d023ee5 100644 --- a/tests/acceptance/features/bootstrap/WaitFor.php +++ b/tests/acceptance/features/bootstrap/WaitFor.php @@ -39,7 +39,7 @@ class WaitFor { * the timeout expires, false otherwise. */ public static function elementToBeEventuallyShown(Actor $actor, Locator $elementLocator, $timeout = 10, $timeoutStep = 1) { - $elementShownCallback = function() use ($actor, $elementLocator) { + $elementShownCallback = function () use ($actor, $elementLocator) { try { return $actor->find($elementLocator)->isVisible(); } catch (NoSuchElementException $exception) { @@ -64,7 +64,7 @@ class WaitFor { * the timeout expires, false otherwise. */ public static function elementToBeEventuallyNotShown(Actor $actor, Locator $elementLocator, $timeout = 10, $timeoutStep = 1) { - $elementNotShownCallback = function() use ($actor, $elementLocator) { + $elementNotShownCallback = function () use ($actor, $elementLocator) { try { return !$actor->find($elementLocator)->isVisible(); } catch (NoSuchElementException $exception) { diff --git a/tests/acceptance/features/core/ElementFinder.php b/tests/acceptance/features/core/ElementFinder.php index d075e9fe660..5570637aa96 100644 --- a/tests/acceptance/features/core/ElementFinder.php +++ b/tests/acceptance/features/core/ElementFinder.php @@ -56,7 +56,7 @@ class ElementFinder { $locator = $elementLocator->getLocator(); $ancestorElement = self::findAncestorElement($session, $elementLocator, $timeout, $timeoutStep); - $findCallback = function() use (&$element, $selector, $locator, $ancestorElement) { + $findCallback = function () use (&$element, $selector, $locator, $ancestorElement) { $element = $ancestorElement->find($selector, $locator); return $element !== null; diff --git a/tests/acceptance/features/core/ElementWrapper.php b/tests/acceptance/features/core/ElementWrapper.php index c866ea699fe..97b1b4bfbcd 100644 --- a/tests/acceptance/features/core/ElementWrapper.php +++ b/tests/acceptance/features/core/ElementWrapper.php @@ -141,7 +141,7 @@ class ElementWrapper { * @return bool true if the wrapped element is visible, false otherwise. */ public function isVisible() { - $commandCallback = function() { + $commandCallback = function () { return $this->element->isVisible(); }; return $this->executeCommand($commandCallback, "visibility could not be got"); @@ -153,7 +153,7 @@ class ElementWrapper { * @return bool true if the wrapped element is checked, false otherwise. */ public function isChecked() { - $commandCallback = function() { + $commandCallback = function () { return $this->element->isChecked(); }; return $this->executeCommand($commandCallback, "check state could not be got"); @@ -169,7 +169,7 @@ class ElementWrapper { * is not visible. */ public function getText() { - $commandCallback = function() { + $commandCallback = function () { return $this->element->getText(); }; return $this->executeCommand($commandCallback, "text could not be got"); @@ -183,7 +183,7 @@ class ElementWrapper { * @return string the value of the wrapped element. */ public function getValue() { - $commandCallback = function() { + $commandCallback = function () { return $this->element->getValue(); }; return $this->executeCommand($commandCallback, "value could not be got"); @@ -198,7 +198,7 @@ class ElementWrapper { * @param string $value the value to set. */ public function setValue($value) { - $commandCallback = function() use ($value) { + $commandCallback = function () use ($value) { $this->element->setValue($value); }; $this->executeCommandOnVisibleElement($commandCallback, "value could not be set"); @@ -211,7 +211,7 @@ class ElementWrapper { * timeout set when finding it). */ public function click() { - $commandCallback = function() { + $commandCallback = function () { $this->element->click(); }; $this->executeCommandOnVisibleElement($commandCallback, "could not be clicked"); @@ -224,7 +224,7 @@ class ElementWrapper { * timeout set when finding it). */ public function check() { - $commandCallback = function() { + $commandCallback = function () { $this->element->check(); }; $this->executeCommand($commandCallback, "could not be checked"); @@ -237,7 +237,7 @@ class ElementWrapper { * timeout set when finding it). */ public function uncheck() { - $commandCallback = function() { + $commandCallback = function () { $this->element->uncheck(); }; $this->executeCommand($commandCallback, "could not be unchecked"); @@ -325,7 +325,7 @@ class ElementWrapper { * otherwise. */ private function waitForElementToBeVisible() { - $isVisibleCallback = function() { + $isVisibleCallback = function () { return $this->isVisible(); }; $timeout = $this->elementFinder->getTimeout(); diff --git a/tests/acceptance/features/core/Utils.php b/tests/acceptance/features/core/Utils.php index 86b7515e4c6..f81542eb079 100644 --- a/tests/acceptance/features/core/Utils.php +++ b/tests/acceptance/features/core/Utils.php @@ -71,7 +71,7 @@ class Utils { * @return boolean true if the server was found, false otherwise. */ public static function waitForServer($url, $timeout, $timeoutStep = 0.5) { - $isServerUpCallback = function() use ($url) { + $isServerUpCallback = function () use ($url) { $curlHandle = curl_init($url); // Returning the transfer as the result of curl_exec prevents the |