Skip to content

Commit

Permalink
PHP 7.3 compatibility: replace continue targeting a switch with a break.
Browse files Browse the repository at this point in the history
  • Loading branch information
echernyavskiy authored and sebastianbergmann committed Dec 18, 2018
1 parent 1799bbc commit 6834fda
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Analyser.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function preProcessFile($filename)

case T_CLASS:
if (!$this->isClassDeclaration($tokens, $i)) {
continue;
break;
}

$className = $this->getClassName($namespace, $tokens, $i);
Expand Down Expand Up @@ -206,7 +206,7 @@ public function countFile($filename, $countTests)
case T_INTERFACE:
case T_TRAIT:
if (!$this->isClassDeclaration($tokens, $i)) {
continue;
break;
}

$this->collector->currentClassReset();
Expand Down Expand Up @@ -238,7 +238,7 @@ public function countFile($filename, $countTests)
$prev = $this->getPreviousNonWhitespaceTokenPos($tokens, $i);

if ($tokens[$prev][0] === T_USE) {
continue;
break;
}

$currentBlock = T_FUNCTION;
Expand Down

0 comments on commit 6834fda

Please sign in to comment.