Skip to content

Commit 4e75184

Browse files
committed
only show warning in paranoia mode
1 parent 5db2330 commit 4e75184

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Security/Sniffs/Misc/TypeJuggleSniff.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ public function register() {
2828
public function process(File $phpcsFile, $stackPtr) {
2929
$tokens = $phpcsFile->getTokens();
3030
$warning = 'You are using a comparison that converts type and may cause unintended results.';
31-
$phpcsFile->addWarning($warning, $stackPtr, 'TypeJuggle');
31+
if (\PHP_CodeSniffer\Config::getConfigData('ParanoiaMode')) {
32+
$phpcsFile->addWarning($warning, $stackPtr, 'TypeJuggle');
33+
}
3234
}
3335

3436
}

0 commit comments

Comments
 (0)