aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Darricau <github@nicofuma.fr>2014-11-27 11:20:26 +0100
committerTristan Darricau <github@nicofuma.fr>2014-11-27 11:20:26 +0100
commit79ce924bc10cd528b3d9287bfcfaa96f96b88bc2 (patch)
tree05fcaf04438f30e703197eb28c743ca56e114acd
parentd43e8c94f578f1e8e57b2b78c59c2169b9c5f789 (diff)
downloadforums-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
-rw-r--r--build/code_sniffer/phpbb/Sniffs/Commenting/FileCommentSniff.php6
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]]))
{