diff options
author | Tristan Darricau <github@nicofuma.fr> | 2014-11-27 11:20:26 +0100 |
---|---|---|
committer | Tristan Darricau <github@nicofuma.fr> | 2014-11-27 11:20:26 +0100 |
commit | 79ce924bc10cd528b3d9287bfcfaa96f96b88bc2 (patch) | |
tree | 05fcaf04438f30e703197eb28c743ca56e114acd /build/code_sniffer/phpbb | |
parent | d43e8c94f578f1e8e57b2b78c59c2169b9c5f789 (diff) | |
download | forums-79ce924bc10cd528b3d9287bfcfaa96f96b88bc2.tar forums-79ce924bc10cd528b3d9287bfcfaa96f96b88bc2.tar.gz forums-79ce924bc10cd528b3d9287bfcfaa96f96b88bc2.tar.bz2 forums-79ce924bc10cd528b3d9287bfcfaa96f96b88bc2.tar.xz forums-79ce924bc10cd528b3d9287bfcfaa96f96b88bc2.zip |
[ticket/13381] Allow ' *' in the doc blocks (especially the header files)
PHPBB3-13381
Diffstat (limited to 'build/code_sniffer/phpbb')
-rw-r--r-- | build/code_sniffer/phpbb/Sniffs/Commenting/FileCommentSniff.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/build/code_sniffer/phpbb/Sniffs/Commenting/FileCommentSniff.php b/build/code_sniffer/phpbb/Sniffs/Commenting/FileCommentSniff.php index fa7d3b40c1..8337cf02ee 100644 --- a/build/code_sniffer/phpbb/Sniffs/Commenting/FileCommentSniff.php +++ b/build/code_sniffer/phpbb/Sniffs/Commenting/FileCommentSniff.php @@ -84,12 +84,12 @@ class phpbb_Sniffs_Commenting_FileCommentSniff implements PHP_CodeSniffer_Sniff $line = $tokens[$i]['content']; // Check that each line starts with a '*' - if (substr($line, 0, 1) !== '*') + if (substr($line, 0, 1) !== '*' && substr($line, 0, 2) !== ' *') { - $message = 'The file doc comment should not be idented.'; + $message = 'The file doc comment should not be indented.'; $phpcsFile->addWarning($message, $i); } - else if (preg_match('/^\*\s+@([\w]+)\s+(.*)$/', $line, $match) !== 0) + else if (preg_match('/^[ ]?\*\s+@([\w]+)\s+(.*)$/', $line, $match) !== 0) { if (!isset($tags[$match[1]])) { |