Skip to content

Commit

Permalink
Correct use of continue within switch
Browse files Browse the repository at this point in the history
  • Loading branch information
g105b committed Nov 8, 2019
1 parent 8ec3024 commit cca4df1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Translator.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ protected function convertSingleSelector(string $css):string {

case 'contains':
if (empty($specifier)) {
continue;
continue 3;
}

$xpath []= "[contains(text(),$specifier)]";
Expand All @@ -103,7 +103,7 @@ protected function convertSingleSelector(string $css):string {

case 'nth-child':
if (empty($specifier)) {
continue;
continue 3;
}

$prev = count($xpath) - 1;
Expand All @@ -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;
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit cca4df1

Please sign in to comment.