Merge pull request #3194 from Nicofuma/ticket/13381

[ticket/13381] Allow ' *' in the doc blocks (especially the header files)
This commit is contained in:
Joas Schilling 2014-11-28 19:58:56 +01:00
commit 8f1a1874a9

View file

@ -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]]))
{