Loading coder_sniffer/Drupal/Sniffs/Commenting/DocCommentAlignmentSniff.php +2 −1 Original line number Diff line number Diff line Loading @@ -137,9 +137,10 @@ class DocCommentAlignmentSniff implements Sniff } } else if ($tokens[($i + 2)]['code'] === T_DOC_COMMENT_TAG && $tokens[($i + 1)]['content'] !== ' ' // Special @code/@endcode tags can have more than 1 space. // Special @code/@endcode/@see tags can have more than 1 space. && $tokens[($i + 2)]['content'] !== '@code' && $tokens[($i + 2)]['content'] !== '@endcode' && $tokens[($i + 2)]['content'] !== '@see' ) { $error = 'Expected 1 space after asterisk; %s found'; $data = [strlen($tokens[($i + 1)]['content'])]; Loading coder_sniffer/Drupal/Sniffs/Commenting/DocCommentSniff.php +1 −0 Original line number Diff line number Diff line Loading @@ -378,6 +378,7 @@ class DocCommentSniff implements Sniff $ignoreTags = [ '@code', '@endcode', '@see', ]; foreach ($tokens[$commentStart]['comment_tags'] as $pos => $tag) { if ($pos > 0) { Loading coder_sniffer/Drupal/Test/Commenting/DocCommentAlignmentUnitTest.inc +11 −0 Original line number Diff line number Diff line Loading @@ -16,3 +16,14 @@ class Test { var $varStyle; } /** * Short description. * * @param string $a * The following reference is allowed to be indented. * @see my_function() */ function test31($a) { } coder_sniffer/Drupal/Test/Commenting/DocCommentAlignmentUnitTest.inc.fixed +11 −0 Original line number Diff line number Diff line Loading @@ -16,3 +16,14 @@ class Test { public $varStyle; } /** * Short description. * * @param string $a * The following reference is allowed to be indented. * @see my_function() */ function test31($a) { } Loading
coder_sniffer/Drupal/Sniffs/Commenting/DocCommentAlignmentSniff.php +2 −1 Original line number Diff line number Diff line Loading @@ -137,9 +137,10 @@ class DocCommentAlignmentSniff implements Sniff } } else if ($tokens[($i + 2)]['code'] === T_DOC_COMMENT_TAG && $tokens[($i + 1)]['content'] !== ' ' // Special @code/@endcode tags can have more than 1 space. // Special @code/@endcode/@see tags can have more than 1 space. && $tokens[($i + 2)]['content'] !== '@code' && $tokens[($i + 2)]['content'] !== '@endcode' && $tokens[($i + 2)]['content'] !== '@see' ) { $error = 'Expected 1 space after asterisk; %s found'; $data = [strlen($tokens[($i + 1)]['content'])]; Loading
coder_sniffer/Drupal/Sniffs/Commenting/DocCommentSniff.php +1 −0 Original line number Diff line number Diff line Loading @@ -378,6 +378,7 @@ class DocCommentSniff implements Sniff $ignoreTags = [ '@code', '@endcode', '@see', ]; foreach ($tokens[$commentStart]['comment_tags'] as $pos => $tag) { if ($pos > 0) { Loading
coder_sniffer/Drupal/Test/Commenting/DocCommentAlignmentUnitTest.inc +11 −0 Original line number Diff line number Diff line Loading @@ -16,3 +16,14 @@ class Test { var $varStyle; } /** * Short description. * * @param string $a * The following reference is allowed to be indented. * @see my_function() */ function test31($a) { }
coder_sniffer/Drupal/Test/Commenting/DocCommentAlignmentUnitTest.inc.fixed +11 −0 Original line number Diff line number Diff line Loading @@ -16,3 +16,14 @@ class Test { public $varStyle; } /** * Short description. * * @param string $a * The following reference is allowed to be indented. * @see my_function() */ function test31($a) { }