Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions coder_sniffer/Drupal/Sniffs/Commenting/DocCommentSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ public function process(File $phpcsFile, $stackPtr)
if ($tokens[$firstTag]['line'] !== ($tokens[$prev]['line'] + 2)
&& isset($fileShort) === false
&& in_array($tokens[$firstTag]['content'], ['@code', '@link', '@endlink']) === false
&& isset(Tokens::$phpcsCommentTokens[$tokens[$prev]['code']]) === false
) {
$error = 'There must be exactly one blank line before the tags in a doc comment';
$fix = $phpcsFile->addFixableError($error, $firstTag, 'SpacingBeforeTags');
Expand Down
17 changes: 17 additions & 0 deletions tests/Drupal/good/good.php
Original file line number Diff line number Diff line change
Expand Up @@ -1986,3 +1986,20 @@ protected function getFallbackPluginId($plugin_id, array $configuration = []) {
}

}

/**
* Provides a collection of condition plugins.
*/
class ConditionPluginCollection extends DefaultLazyPluginCollection {

/**
* {@inheritdoc}
*
* phpcs:ignore Drupal.Commenting.FunctionComment.MissingReturnComment
* @return \Drupal\Core\Condition\ConditionInterface
*/
public function &get($instance_id) {
return 'x';
}

}