From 41e9b64418b7fe67a3b618b7c7471137eb36b89c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maur=C3=ADcio=20Meneghini=20Fauth?= Date: Sun, 19 Feb 2023 18:55:35 -0300 Subject: [PATCH] Remove exception variable from non-capturing catch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: MaurĂ­cio Meneghini Fauth --- phpcs.xml.dist | 3 --- test/selenium/TestBase.php | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/phpcs.xml.dist b/phpcs.xml.dist index 857b2eadb0..722dd13728 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -87,9 +87,6 @@ 4 - - 4 - 4 diff --git a/test/selenium/TestBase.php b/test/selenium/TestBase.php index 7f9ac21af7..722f5b4aa4 100644 --- a/test/selenium/TestBase.php +++ b/test/selenium/TestBase.php @@ -802,7 +802,7 @@ abstract class TestBase extends TestCase { try { $this->webDriver->findElement(WebDriverBy::$func($arg)); - } catch (NoSuchElementException | InvalidArgumentException | InvalidSelectorException $e) { + } catch (NoSuchElementException | InvalidArgumentException | InvalidSelectorException) { // Element not present return false; } @@ -944,7 +944,7 @@ abstract class TestBase extends TestCase $this->waitForElement('cssSelector', 'li.dropdown.show > a'); $this->waitUntilElementIsPresent('cssSelector', 'li.nav-item.dropdown.show > ul', 5000); - } catch (WebDriverException $e) { + } catch (WebDriverException) { return; } }