Remove exception variable from non-capturing catch

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
Maurício Meneghini Fauth 2023-02-19 18:55:35 -03:00
parent f5ed30d772
commit 41e9b64418
No known key found for this signature in database
GPG Key ID: 6A16FD38AFC89CC8
2 changed files with 2 additions and 5 deletions

View File

@ -87,9 +87,6 @@
<rule ref="SlevomatCodingStandard.PHP.RequireNowdoc.RequiredNowdoc">
<severity>4</severity>
</rule>
<rule ref="SlevomatCodingStandard.Exceptions.RequireNonCapturingCatch.NonCapturingCatchRequired">
<severity>4</severity>
</rule>
<rule ref="Squiz.NamingConventions.ValidVariableName.NotCamelCaps">
<severity>4</severity>
</rule>

View File

@ -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;
}
}