Skip to content

Commit f41318b

Browse files
committed
Merge branch 'wip-PHP-1010' of https://github.com/2shediac/PHP_CodeSniffer
2 parents ad76ed2 + 87f99f7 commit f41318b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CodeSniffer/Standards/Squiz/Sniffs/PHP/NonExecutableCodeSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
6666
// If this token is preceded with an "or", it only relates to one line
6767
// and should be ignored. For example: fopen() or die().
6868
$prev = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr - 1), null, true);
69-
if ($tokens[$prev]['code'] === T_LOGICAL_OR) {
69+
if ($tokens[$prev]['code'] === T_LOGICAL_OR || $tokens[$prev]['code'] === T_BOOLEAN_OR) {
7070
return;
7171
}
7272

0 commit comments

Comments
 (0)