mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/13381] Allow ' *' in the doc blocks (especially the header files)
PHPBB3-13381
This commit is contained in:
parent
d43e8c94f5
commit
79ce924bc1
1 changed files with 3 additions and 3 deletions
|
@ -84,12 +84,12 @@ class phpbb_Sniffs_Commenting_FileCommentSniff implements PHP_CodeSniffer_Sniff
|
||||||
$line = $tokens[$i]['content'];
|
$line = $tokens[$i]['content'];
|
||||||
|
|
||||||
// Check that each line starts with a '*'
|
// 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);
|
$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]]))
|
if (!isset($tags[$match[1]]))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue