Skip to content

Commit 32b59b9

Browse files
committed
Explicitely compare isset with true
1 parent f66dc72 commit 32b59b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CodeSniffer/Standards/Generic/Sniffs/PHP/DisallowShortOpenTagSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
7373
$fix = $phpcsFile->addFixableError($error, $stackPtr, 'Found', $data);
7474
if ($fix === true) {
7575
$correctOpening = '<?php';
76-
if (isset($tokens[$stackPtr + 1]) && $tokens[$stackPtr + 1]['code'] !== T_WHITESPACE) {
76+
if (isset($tokens[$stackPtr + 1]) === true && $tokens[$stackPtr + 1]['code'] !== T_WHITESPACE) {
7777
// Avoid creation of invalid open tags like <?phpecho if the original was <?echo
7878
$correctOpening .= ' ';
7979
}

0 commit comments

Comments
 (0)