From cca4df1a33e18aff1bb775372ece5fddb032ba67 Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Fri, 8 Nov 2019 13:40:04 +0000 Subject: [PATCH] Correct use of continue within switch --- src/Translator.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Translator.php b/src/Translator.php index 80b9b58..e0f56f8 100644 --- a/src/Translator.php +++ b/src/Translator.php @@ -90,7 +90,7 @@ protected function convertSingleSelector(string $css):string { case 'contains': if (empty($specifier)) { - continue; + continue 3; } $xpath []= "[contains(text(),$specifier)]"; @@ -103,7 +103,7 @@ protected function convertSingleSelector(string $css):string { case 'nth-child': if (empty($specifier)) { - continue; + continue 3; } $prev = count($xpath) - 1; @@ -118,7 +118,7 @@ protected function convertSingleSelector(string $css):string { break; case 'nth-of-type': if (empty($specifier)) { - continue; + continue 3; } $prev = count($xpath) - 1; @@ -161,9 +161,9 @@ protected function convertSingleSelector(string $css):string { $detailValue = $detail[1] ?? null; if(!$detailType - || $detailType["type"] !== "attribute_equals") { + || $detailType["type"] !== "attribute_equals") { $xpath []= "[@{$currentThreadItem['content']}]"; - continue; + continue 2; } $valueString = trim(