Loading coder_sniffer/Drupal/Sniffs/Commenting/DocCommentSniff.php +15 −10 Original line number Diff line number Diff line Loading @@ -165,6 +165,10 @@ class DocCommentSniff implements Sniff $error = 'Doc comment short description must be on the first line'; $fix = $phpcsFile->addFixableError($error, $short, 'SpacingBeforeShort'); if ($fix === true) { // Move file comment short description to the next line. if (isset($fileShort) === true && $tokens[$short]['line'] === $tokens[$start]['line']) { $phpcsFile->fixer->addContentBefore($fileShort, "\n *"); } else { $phpcsFile->fixer->beginChangeset(); for ($i = $start; $i < $short; $i++) { if ($tokens[$i]['line'] === $tokens[$start]['line']) { Loading @@ -179,6 +183,7 @@ class DocCommentSniff implements Sniff $phpcsFile->fixer->endChangeset(); } } }//end if if ($tokens[($short - 1)]['content'] !== ' ' && strpos($tokens[($short - 1)]['content'], $phpcsFile->eolChar) === false Loading coder_sniffer/Drupal/Test/Commenting/DocCommentUnitTest.3.inc 0 → 100644 +7 −0 Original line number Diff line number Diff line <?php /** * @file File contains Theming functions and Node definitions. */ require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'example') . '/example.inc'; coder_sniffer/Drupal/Test/Commenting/DocCommentUnitTest.3.inc.fixed 0 → 100644 +8 −0 Original line number Diff line number Diff line <?php /** * @file * File contains Theming functions and Node definitions. */ require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'example') . '/example.inc'; coder_sniffer/Drupal/Test/Commenting/DocCommentUnitTest.php +3 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,9 @@ class DocCommentUnitTest extends CoderSniffUnitTest 100 => 4, 101 => 1, ]; case 'DocCommentUnitTest.3.inc': return [4 => 1]; default: return []; } Loading Loading
coder_sniffer/Drupal/Sniffs/Commenting/DocCommentSniff.php +15 −10 Original line number Diff line number Diff line Loading @@ -165,6 +165,10 @@ class DocCommentSniff implements Sniff $error = 'Doc comment short description must be on the first line'; $fix = $phpcsFile->addFixableError($error, $short, 'SpacingBeforeShort'); if ($fix === true) { // Move file comment short description to the next line. if (isset($fileShort) === true && $tokens[$short]['line'] === $tokens[$start]['line']) { $phpcsFile->fixer->addContentBefore($fileShort, "\n *"); } else { $phpcsFile->fixer->beginChangeset(); for ($i = $start; $i < $short; $i++) { if ($tokens[$i]['line'] === $tokens[$start]['line']) { Loading @@ -179,6 +183,7 @@ class DocCommentSniff implements Sniff $phpcsFile->fixer->endChangeset(); } } }//end if if ($tokens[($short - 1)]['content'] !== ' ' && strpos($tokens[($short - 1)]['content'], $phpcsFile->eolChar) === false Loading
coder_sniffer/Drupal/Test/Commenting/DocCommentUnitTest.3.inc 0 → 100644 +7 −0 Original line number Diff line number Diff line <?php /** * @file File contains Theming functions and Node definitions. */ require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'example') . '/example.inc';
coder_sniffer/Drupal/Test/Commenting/DocCommentUnitTest.3.inc.fixed 0 → 100644 +8 −0 Original line number Diff line number Diff line <?php /** * @file * File contains Theming functions and Node definitions. */ require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'example') . '/example.inc';
coder_sniffer/Drupal/Test/Commenting/DocCommentUnitTest.php +3 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,9 @@ class DocCommentUnitTest extends CoderSniffUnitTest 100 => 4, 101 => 1, ]; case 'DocCommentUnitTest.3.inc': return [4 => 1]; default: return []; } Loading