Skip to content
Snippets Groups Projects
Commit e2fbc6f1 authored by Klaus Purer's avatar Klaus Purer
Browse files

Issue #1879768 : Fixed Allow {@inheritdoc} in PHPDoc blocks.

parent 8dd01196
Branches
Tags 7.x-2.0
No related merge requests found
......@@ -287,6 +287,7 @@ class Drupal_Sniffs_Commenting_FunctionCommentSniff implements PHP_CodeSniffer_S
$phpcsFile->addError($error, ($commentStart + 1), 'ShortStartSpace');
}
if ($testShort !== '{@inheritdoc}') {
if (preg_match('|[A-Z]|', $testShort[0]) === 0) {
$error = 'Function comment short description must start with a capital letter';
$phpcsFile->addError($error, ($commentStart + 1), 'ShortNotCapital');
......@@ -296,6 +297,7 @@ class Drupal_Sniffs_Commenting_FunctionCommentSniff implements PHP_CodeSniffer_S
$error = 'Function comment short description must end with a full stop';
$phpcsFile->addError($error, ($commentStart + 1), 'ShortFullStop');
}
}
}//end process()
......
......@@ -580,3 +580,18 @@ catch (Exception $e) {
}
$result = $x ?: FALSE;
class Foo implements FooInterface {
/**
* {@inheritdoc}
*/
public function test() {}
/**
* {@inheritdoc}
*
* Some additional documentation here.
*/
public function test2() {}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment