Skip to content

Commit

Permalink
backport Fixed bug squizlabs#1890
Browse files Browse the repository at this point in the history
  • Loading branch information
photodude authored Feb 9, 2018
1 parent 68fb8e5 commit c2abeee
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ class Generic_Sniffs_CodeAnalysis_EmptyStatementSniff implements PHP_CodeSniffer
public function register()
{
return array(
T_TRY,
T_CATCH,
T_FINALLY,
T_DO,
T_ELSE,
T_ELSEIF,
Expand Down Expand Up @@ -98,7 +100,7 @@ public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
// Get token identifier.
$name = strtoupper($token['content']);
$error = 'Empty %s statement detected';
$phpcsFile->addError($error, $stackPtr, 'Detected'.$name, array($name));
$phpcsFile->addError($error, $stackPtr, 'Detected'.ucfirst(strtolower($name)), array($name));

}//end process()

Expand Down

0 comments on commit c2abeee

Please sign in to comment.