Skip to content

Commit e3434b1

Browse files
committed
Merge branch '8.3.x' into 3516489-phpstan-ignore
2 parents c445c99 + 5db17e3 commit e3434b1

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

coder_sniffer/Drupal/Sniffs/Commenting/DocCommentSniff.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,7 @@ public function process(File $phpcsFile, $stackPtr)
370370
if ($tokens[$firstTag]['line'] !== ($tokens[$prev]['line'] + 2)
371371
&& isset($fileShort) === false
372372
&& in_array($tokens[$firstTag]['content'], ['@code', '@link', '@endlink']) === false
373+
&& isset(Tokens::$phpcsCommentTokens[$tokens[$prev]['code']]) === false
373374
) {
374375
$error = 'There must be exactly one blank line before the tags in a doc comment';
375376
$fix = $phpcsFile->addFixableError($error, $firstTag, 'SpacingBeforeTags');

tests/Drupal/good/good.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1987,6 +1987,23 @@ protected function getFallbackPluginId($plugin_id, array $configuration = []) {
19871987

19881988
}
19891989

1990+
/**
1991+
* Provides a collection of condition plugins.
1992+
*/
1993+
class ConditionPluginCollection extends DefaultLazyPluginCollection {
1994+
1995+
/**
1996+
* {@inheritdoc}
1997+
*
1998+
* phpcs:ignore Drupal.Commenting.FunctionComment.MissingReturnComment
1999+
* @return \Drupal\Core\Condition\ConditionInterface
2000+
*/
2001+
public function &get($instance_id) {
2002+
return 'x';
2003+
}
2004+
2005+
}
2006+
19902007
/**
19912008
* Test for @phpstan-ignore-next-line.
19922009
*

0 commit comments

Comments
 (0)