Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
gsherwood committed Sep 21, 2020
2 parents 2b845d1 + 898d911 commit bbaf20f
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,10 @@ public function process(File $phpcsFile, $stackPtr)
return;
}

if ($tokens[$nextNonEmpty]['code'] === T_COLON) {
// Alternative control structure.
if ($tokens[$nextNonEmpty]['code'] === T_OPEN_CURLY_BRACKET
|| $tokens[$nextNonEmpty]['code'] === T_COLON
) {
// T_CLOSE_CURLY_BRACKET missing, or alternative control structure with
// T_END... missing. Either live coding, parse error or end
// tag in short open tags and scan run with short_open_tag=Off.
// Bow out completely as any further detection will be unreliable
Expand Down

0 comments on commit bbaf20f

Please sign in to comment.